
// Generated from /home/chh/gitprojects/plc2llvm/grammar/PLCSTParser.g4 by ANTLR 4.11.1


#include "plc2llvm/Visitor/PLCSTParserListener.h"
#include "plc2llvm/Visitor/PLCSTParserVisitor.h"

#include "plc2llvm/Parser/PLCSTParser.h"


using namespace antlrcpp;
using namespace plcst;

using namespace antlr4;

namespace {

struct PLCSTParserStaticData final {
  PLCSTParserStaticData(std::vector<std::string> ruleNames,
                        std::vector<std::string> literalNames,
                        std::vector<std::string> symbolicNames)
      : ruleNames(std::move(ruleNames)), literalNames(std::move(literalNames)),
        symbolicNames(std::move(symbolicNames)),
        vocabulary(this->literalNames, this->symbolicNames) {}

  PLCSTParserStaticData(const PLCSTParserStaticData&) = delete;
  PLCSTParserStaticData(PLCSTParserStaticData&&) = delete;
  PLCSTParserStaticData& operator=(const PLCSTParserStaticData&) = delete;
  PLCSTParserStaticData& operator=(PLCSTParserStaticData&&) = delete;

  std::vector<antlr4::dfa::DFA> decisionToDFA;
  antlr4::atn::PredictionContextCache sharedContextCache;
  const std::vector<std::string> ruleNames;
  const std::vector<std::string> literalNames;
  const std::vector<std::string> symbolicNames;
  const antlr4::dfa::Vocabulary vocabulary;
  antlr4::atn::SerializedATNView serializedATN;
  std::unique_ptr<antlr4::atn::ATN> atn;
};

::antlr4::internal::OnceFlag plcstparserParserOnceFlag;
PLCSTParserStaticData *plcstparserParserStaticData = nullptr;

void plcstparserParserInitialize() {
  assert(plcstparserParserStaticData == nullptr);
  auto staticData = std::make_unique<PLCSTParserStaticData>(
    std::vector<std::string>{
      "startpoint", "constant", "numeric_Literal", "int_Literal", "real_Literal", 
      "bool_Literal", "char_Str", "wChar_Str", "char_Literal", "time_Literal", 
      "bit_Str_Literal", "numeric_Type_Name", "string_Type_Name", "bit_Str_Type_Name", 
      "data_Type_Access", "elem_Type_Name", "nestedNameSpecifier", "derived_Type_Access", 
      "struct_Type_Access", "data_Type_Decl", "type_Decl", "simple_Type_Decl", 
      "nested_Simple_Type_Decl", "simple_Spec_Init", "simple_Spec", "subrange_Type_Decl", 
      "subrange_Spec_Init", "subrange_Spec", "subrange", "enum_Type_Decl", 
      "named_Spec_Init", "enum_Spec_Init", "enum_Value_Spec", "enum_Value", 
      "array_Type_Decl", "array_Spec_Init", "array_Spec", "nested_Array_Type_Name", 
      "direct_Array_Type_Name", "array_Init", "array_Elem_Init", "mult_Array_Elem_Init_Value", 
      "array_Elem_Init_Value", "struct_Type_Decl", "nested_Struct_Type_Decl", 
      "struct_Spec", "struct_Spec_Init", "struct_Decl", "struct_Elem_Decl", 
      "struct_Init", "struct_Elem_Init", "str_Type_Decl", "ref_Type_Decl", 
      "ref_Spec_Init", "ref_Spec", "ref_Type_Access", "ref_Value", "ref_Addr", 
      "ref_Assign", "ref_Deref", "variable", "symbolic_Variable", "var_Access", 
      "multi_Elem_Var", "subscript_List", "subscript", "struct_Variable", 
      "struct_Elem_Select", "input_Decls", "input_Decl", "var_Decl_Init", 
      "common_Var_Decl_Init", "edge_Decl", "ref_Var_Decl", "interface_Var_Decl", 
      "variable_List", "array_Conformand", "array_Conform_Decl", "fB_Decl_No_Init", 
      "fB_Spec_Init", "fB_Instance_Name", "output_Decls", "output_Decl", 
      "in_Out_Decls", "in_Out_Var_Decl", "var_Decl", "array_Var_Decl", "struct_Var_Decl", 
      "var_Decls", "retain_Var_Decls", "loc_Var_Decls", "loc_Var_Decl", 
      "temp_Var_Decls", "external_Var_Decls", "external_Decl", "global_Var_Decls", 
      "global_Var_Decl", "global_Var_Spec", "loc_Var_Spec_Init", "located_At", 
      "str_Var_Decl", "s_Byte_Str_Var_Decl", "s_Byte_Str_Spec", "d_Byte_Str_Var_Decl", 
      "d_Byte_Str_Spec", "loc_Partly_Var_Decl", "loc_Partly_Var", "var_Spec", 
      "func_Name", "func_Access", "func_Decl", "iO_Var_Decls", "func_Var_Decls", 
      "func_Body", "fB_Type_Name", "fB_Type_Access", "fB_Decl", "fB_IO_Var_Decls", 
      "fB_Input_Decls", "fB_Input_Decl", "fB_Output_Decls", "fB_Output_Decl", 
      "other_Var_Decls", "no_Retain_Var_Decls", "fB_Body", "method_Decl", 
      "access_Spec", "class_Decl", "class_Type_Access", "class_Instance_Name", 
      "interface_Decl", "method_Prototype", "interface_Spec_Init", "interface_Value", 
      "interface_Name_List", "interface_Type_Access", "prog_Decl", "prog_Type_Access", 
      "prog_Access_Decls", "prog_Access_Decl", "sFC", "sfc_Network", "initial_Step", 
      "step", "action_Association", "action_Qualifier", "action_Time", "transition", 
      "steps", "transition_Cond", "action", "config_Decl", "resource_Decl", 
      "single_Resource_Decl", "access_Decls", "access_Decl", "access_Path", 
      "global_Var_Access", "prog_Output_Access", "task_Config", "task_Init", 
      "data_Source", "prog_Config", "prog_Conf_Elems", "prog_Conf_Elem", 
      "fB_Task", "prog_Cnxn", "prog_Data_Source", "data_Sink", "config_Init", 
      "config_Inst_Init", "namespace_Decl", "namespace_Elements", "namespace_H_Name", 
      "using_Directive", "pOU_Decl", "expression", "constant_Expr", "xor_Expr", 
      "and_Expr", "compare_Expr", "equ_Expr", "add_Expr", "term", "power_Expr", 
      "unary_Expr", "paren_Surrounded_Expr", "primary_Expr", "variable_Access", 
      "callable_Obj_Params_Assign", "func_Call", "stmt_List", "stmt", "assign_Stmt", 
      "var_Assign", "assignment_Attempt", "inside_Callable_Obj", "callable_Obj", 
      "invocation", "subprog_Ctrl_Stmt", "param_Assign", "common_Param_Assign", 
      "ref_Param_Assign", "other_Param_Assign", "selection_Stmt", "iF_Stmt", 
      "case_Stmt", "case_Selection", "case_List", "case_List_Elem", "iteration_Stmt", 
      "for_Stmt", "for_List", "while_Stmt", "repeat_Stmt", "simple_Type_Name", 
      "subrange_Type_Name", "enum_Type_Name", "array_Type_Name", "struct_Type_Name", 
      "struct_Elem_Name", "ref_Name", "ref_Type_Name", "variable_Name", 
      "fB_Name", "global_Var_Name", "derived_Func_Name", "derived_FB_Name", 
      "method_Name", "class_Type_Name", "class_Name", "interface_Type_Name", 
      "prog_Type_Name", "step_Name", "action_Name", "transition_Name", "config_Name", 
      "resource_Type_Name", "resource_Name", "access_Name", "prog_Name", 
      "task_Name", "namespace_Name", "control_Variable", "indicator_Name", 
      "identifier"
    },
    std::vector<std::string>{
      "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
      "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "'CHAR'", 
      "'WCHAR'", "", "", "", "", "'BOOL'", "", "'TYPE'", "'END_TYPE'", "'ARRAY'", 
      "'OF'", "'STRUCT'", "'END_STRUCT'", "'OVERLAP'", "", "'REF_TO'", "'NULL'", 
      "'REF'", "'THIS'", "'VAR_INPUT'", "'END_VAR'", "'RETAIN'", "'NON_RETAIN'", 
      "'R_EDGE'", "'F_EDGE'", "'VAR_OUTPUT'", "'VAR_IN_OUT'", "'VAR'", "'CONSTANT'", 
      "'VAR_TEMP'", "'VAR_EXTERNAL'", "'VAR_GLOBAL'", "'AT'", "'STRING'", 
      "'WSTRING'", "", "", "'FUNCTION'", "'END_FUNCTION'", "", "'FUNCTION_BLOCK'", 
      "'FINAL'", "'ABSTRACT'", "'EXTENDS'", "'IMPLEMENTS'", "'END_FUNCTION_BLOCK'", 
      "'METHOD'", "'END_METHOD'", "'OVERRIDE'", "'CLASS'", "'END_CLASS'", 
      "'INTERFACE'", "'END_INTERFACE'", "'PUBLIC'", "'PROTECTED'", "'PRIVATE'", 
      "'PROGRAM'", "'END_PROGRAM'", "'VAR_ACCESS'", "'INITIAL_STEP'", "'END_STEP'", 
      "'STEP'", "", "", "'TRANSITION'", "'END_TRANSITION'", "'PRIORITY'", 
      "'FROM'", "'ACTION'", "'END_ACTION'", "'CONFIGURATION'", "'END_CONFIGURATION'", 
      "'RESOURCE'", "'ON'", "'END_RESOURCE'", "", "'TASK'", "'INTERVAL'", 
      "'SINGLE'", "'WITH'", "'VAR_CONFIG'", "'NAMESPACE'", "'INTERNAL'", 
      "'END_NAMESPACE'", "'USING'", "'OR'", "'XOR'", "'AND'", "'MOD'", "'NOT'", 
      "", "'SUPER'", "'RETURN'", "'IF'", "'THEN'", "'ELSIF'", "'ELSE'", 
      "'END_IF'", "'CASE'", "'END_CASE'", "'EXIT'", "'CONTINUE'", "'FOR'", 
      "'DO'", "'END_FOR'", "'TO'", "'BY'", "'WHILE'", "'END_WHILE'", "'REPEAT'", 
      "'UNTIL'", "'END_REPEAT'", "", "", "", "", "", "'.'", "';'", "':'", 
      "':='", "'('", "')'", "'..'", "'^'", "','", "'_'", "'#'", "'['", "']'", 
      "'**'", "'&'", "'='", "'<>'", "'<'", "'>'", "'<='", "'>='", "'+'", 
      "'-'", "'/'", "'\\u003F='", "'=>'", "'*'"
    },
    std::vector<std::string>{
      "", "Unsigned_Int", "Signed_Int", "Binary_Int", "Octal_Int", "Hex_Int", 
      "Science_real", "Const_bool", "S_Byte_Char_Str", "D_Byte_Char_Str", 
      "Duration", "Interval", "Days", "Hours", "Minutes", "Seconds", "Milliseconds", 
      "Microseconds", "Nanoseconds", "Time_Of_Day", "Daytime", "Day_Hour", 
      "Day_Minute", "Day_Second", "Date", "Date_Literal", "Year", "Month", 
      "Day", "Date_And_Time", "Int_Type_Name", "Real_Type_Name", "CHAR", 
      "WCHAR", "SString_Type_Name", "WString_Type_Name", "Time_Type_Name", 
      "Date_Type_Name", "Bool_Type_Name", "Multibits_Type_Name", "TYPE", 
      "END_TYPE", "ARRAY", "OF", "STRUCT", "END_STRUCT", "OVERLAP", "Direct_Variable", 
      "REF_TO", "Null", "REF", "THIS", "VAR_INPUT", "END_VAR", "RETAIN", 
      "NON_RETAIN", "R_EDGE", "F_EDGE", "VAR_OUTPUT", "VAR_IN_OUT", "VAR", 
      "CONSTANT", "VAR_TEMP", "VAR_EXTERNAL", "VAR_GLOBAL", "AT", "STRING", 
      "WSTRING", "Var_Location", "Std_Func_Name", "FUNCTION", "END_FUNCTION", 
      "Std_FB_Name", "FUNCTION_BLOCK", "FINAL", "ABSTRACT", "EXTENDS", "IMPLEMENTS", 
      "END_FUNCTION_BLOCK", "METHOD", "END_METHOD", "OVERRIDE", "CLASS", 
      "END_CLASS", "INTERFACE", "END_INTERFACE", "PUBLIC", "PROTECTED", 
      "PRIVATE", "PROGRAM", "END_PROGRAM", "VAR_ACCESS", "INITIAL_STEP", 
      "END_STEP", "STEP", "ACTION_QUALIFIER", "ACTION_TIME_QUALIFIER", "TRANSITION", 
      "END_TRANSITION", "PRIORITY", "FROM", "ACTION", "END_ACTION", "CONFIGURATION", 
      "END_CONFIGURATION", "RESOURCE", "ON", "END_RESOURCE", "Access_Direction", 
      "TASK", "INTERVAL", "SINGLE", "WITH", "VAR_CONFIG", "NAMESPACE", "INTERNAL", 
      "END_NAMESPACE", "USING", "OR", "XOR", "AND", "MOD", "NOT", "Multibit_Part_Access", 
      "SUPER", "RETURN", "IF", "THEN", "ELSIF", "ELSE", "END_IF", "CASE", 
      "END_CASE", "EXIT", "CONTINUE", "FOR", "DO", "END_FOR", "TO", "BY", 
      "WHILE", "END_WHILE", "REPEAT", "UNTIL", "END_REPEAT", "Identifier", 
      "Whitespace", "Newline", "BlockComment", "LineComment", "Dot", "Semi", 
      "Colon", "Assign", "LeftParen", "RightParen", "RangeDot", "Caret", 
      "Comma", "Underline", "TypeSign", "LeftBracket", "RightBracket", "StarStar", 
      "AndSign", "Equal", "NotEqual", "Less", "Greater", "LessEqual", "GreaterEqual", 
      "Plus", "Minus", "Div", "QuestionEqual", "LeftAssign", "Star"
    }
  );
  static const int32_t serializedATNSegment[] = {
  	4,1,176,2394,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,
  	2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,
  	7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,
  	7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,
  	7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,
  	7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,
  	7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,
  	7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,
  	7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,
  	7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,
  	7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,
  	7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,
  	7,84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91,
  	7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2,98,
  	7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103,2,104,
  	7,104,2,105,7,105,2,106,7,106,2,107,7,107,2,108,7,108,2,109,7,109,2,110,
  	7,110,2,111,7,111,2,112,7,112,2,113,7,113,2,114,7,114,2,115,7,115,2,116,
  	7,116,2,117,7,117,2,118,7,118,2,119,7,119,2,120,7,120,2,121,7,121,2,122,
  	7,122,2,123,7,123,2,124,7,124,2,125,7,125,2,126,7,126,2,127,7,127,2,128,
  	7,128,2,129,7,129,2,130,7,130,2,131,7,131,2,132,7,132,2,133,7,133,2,134,
  	7,134,2,135,7,135,2,136,7,136,2,137,7,137,2,138,7,138,2,139,7,139,2,140,
  	7,140,2,141,7,141,2,142,7,142,2,143,7,143,2,144,7,144,2,145,7,145,2,146,
  	7,146,2,147,7,147,2,148,7,148,2,149,7,149,2,150,7,150,2,151,7,151,2,152,
  	7,152,2,153,7,153,2,154,7,154,2,155,7,155,2,156,7,156,2,157,7,157,2,158,
  	7,158,2,159,7,159,2,160,7,160,2,161,7,161,2,162,7,162,2,163,7,163,2,164,
  	7,164,2,165,7,165,2,166,7,166,2,167,7,167,2,168,7,168,2,169,7,169,2,170,
  	7,170,2,171,7,171,2,172,7,172,2,173,7,173,2,174,7,174,2,175,7,175,2,176,
  	7,176,2,177,7,177,2,178,7,178,2,179,7,179,2,180,7,180,2,181,7,181,2,182,
  	7,182,2,183,7,183,2,184,7,184,2,185,7,185,2,186,7,186,2,187,7,187,2,188,
  	7,188,2,189,7,189,2,190,7,190,2,191,7,191,2,192,7,192,2,193,7,193,2,194,
  	7,194,2,195,7,195,2,196,7,196,2,197,7,197,2,198,7,198,2,199,7,199,2,200,
  	7,200,2,201,7,201,2,202,7,202,2,203,7,203,2,204,7,204,2,205,7,205,2,206,
  	7,206,2,207,7,207,2,208,7,208,2,209,7,209,2,210,7,210,2,211,7,211,2,212,
  	7,212,2,213,7,213,2,214,7,214,2,215,7,215,2,216,7,216,2,217,7,217,2,218,
  	7,218,2,219,7,219,2,220,7,220,2,221,7,221,2,222,7,222,2,223,7,223,2,224,
  	7,224,2,225,7,225,2,226,7,226,2,227,7,227,2,228,7,228,2,229,7,229,2,230,
  	7,230,2,231,7,231,2,232,7,232,2,233,7,233,2,234,7,234,2,235,7,235,2,236,
  	7,236,2,237,7,237,2,238,7,238,2,239,7,239,2,240,7,240,2,241,7,241,2,242,
  	7,242,2,243,7,243,2,244,7,244,2,245,7,245,1,0,1,0,1,0,1,0,5,0,497,8,0,
  	10,0,12,0,500,9,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,3,1,509,8,1,1,2,1,2,3,2,
  	513,8,2,1,3,1,3,3,3,517,8,3,1,3,1,3,1,4,1,4,3,4,523,8,4,1,4,1,4,1,5,1,
  	5,3,5,529,8,5,1,5,1,5,1,6,1,6,3,6,535,8,6,1,6,1,6,1,7,1,7,3,7,541,8,7,
  	1,7,1,7,1,8,1,8,3,8,547,8,8,1,9,1,9,1,10,1,10,3,10,553,8,10,1,10,1,10,
  	1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,3,14,565,8,14,1,15,1,15,1,15,
  	1,15,1,15,3,15,572,8,15,1,16,1,16,1,16,1,17,5,17,578,8,17,10,17,12,17,
  	581,9,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,3,17,592,8,17,1,
  	18,5,18,595,8,18,10,18,12,18,598,9,18,1,18,1,18,1,19,1,19,1,19,1,19,4,
  	19,606,8,19,11,19,12,19,607,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,1,
  	20,3,20,619,8,20,1,21,1,21,1,21,1,21,1,22,5,22,626,8,22,10,22,12,22,629,
  	9,22,1,22,1,22,1,23,1,23,1,23,3,23,636,8,23,1,24,1,24,3,24,640,8,24,1,
  	25,1,25,1,25,1,25,1,26,1,26,1,26,3,26,649,8,26,1,27,1,27,1,27,1,27,1,
  	27,1,27,5,27,657,8,27,10,27,12,27,660,9,27,1,27,3,27,663,8,27,1,28,1,
  	28,1,28,1,28,1,29,1,29,1,29,3,29,672,8,29,1,29,1,29,3,29,676,8,29,1,30,
  	1,30,1,30,1,30,5,30,682,8,30,10,30,12,30,685,9,30,1,30,1,30,1,30,3,30,
  	690,8,30,1,31,1,31,1,31,1,31,5,31,696,8,31,10,31,12,31,699,9,31,1,31,
  	1,31,1,31,5,31,704,8,31,10,31,12,31,707,9,31,1,31,3,31,710,8,31,1,31,
  	1,31,3,31,714,8,31,1,32,1,32,1,32,1,32,3,32,720,8,32,3,32,722,8,32,1,
  	33,1,33,1,33,3,33,727,8,33,1,33,1,33,1,34,1,34,1,34,1,34,1,35,1,35,1,
  	35,3,35,738,8,35,1,36,1,36,3,36,742,8,36,1,37,5,37,745,8,37,10,37,12,
  	37,748,9,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38,5,38,757,8,38,10,38,12,
  	38,760,9,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,5,39,770,8,39,10,
  	39,12,39,773,9,39,1,39,1,39,1,40,1,40,3,40,779,8,40,1,41,1,41,1,41,3,
  	41,784,8,41,1,41,1,41,1,42,1,42,1,42,1,42,3,42,792,8,42,1,43,1,43,1,43,
  	1,43,1,44,5,44,799,8,44,10,44,12,44,802,9,44,1,44,1,44,1,45,1,45,3,45,
  	808,8,45,1,46,1,46,1,46,3,46,813,8,46,1,47,1,47,3,47,817,8,47,1,47,1,
  	47,1,47,4,47,822,8,47,11,47,12,47,823,1,47,1,47,1,48,1,48,1,48,3,48,831,
  	8,48,3,48,833,8,48,1,48,1,48,1,48,1,48,1,48,1,48,3,48,841,8,48,1,49,1,
  	49,1,49,1,49,5,49,847,8,49,10,49,12,49,850,9,49,1,49,1,49,1,50,1,50,1,
  	50,1,50,1,50,1,50,1,50,3,50,861,8,50,1,51,1,51,1,51,1,51,1,51,3,51,868,
  	8,51,1,52,1,52,1,52,1,52,1,53,1,53,1,53,3,53,877,8,53,1,54,4,54,880,8,
  	54,11,54,12,54,881,1,54,1,54,1,55,5,55,887,8,55,10,55,12,55,890,9,55,
  	1,55,1,55,1,56,1,56,3,56,896,8,56,1,57,1,57,1,57,1,57,1,57,3,57,903,8,
  	57,1,57,1,57,1,58,1,58,1,58,1,58,1,58,3,58,912,8,58,1,59,1,59,4,59,916,
  	8,59,11,59,12,59,917,1,60,1,60,3,60,922,8,60,1,61,1,61,1,61,4,61,927,
  	8,61,11,61,12,61,928,3,61,931,8,61,1,61,1,61,3,61,935,8,61,1,62,1,62,
  	3,62,939,8,62,1,63,1,63,1,63,4,63,944,8,63,11,63,12,63,945,1,64,1,64,
  	1,64,1,64,5,64,952,8,64,10,64,12,64,955,9,64,1,64,1,64,1,65,1,65,1,66,
  	1,66,1,66,1,67,1,67,1,68,1,68,3,68,968,8,68,1,68,1,68,1,68,5,68,973,8,
  	68,10,68,12,68,976,9,68,1,68,1,68,1,69,1,69,1,69,3,69,983,8,69,1,70,1,
  	70,3,70,987,8,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,3,71,996,8,71,1,72,
  	1,72,1,72,1,72,1,72,1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,75,1,75,
  	1,75,5,75,1014,8,75,10,75,12,75,1017,9,75,1,76,1,76,1,76,1,76,1,76,5,
  	76,1024,8,76,10,76,12,76,1027,9,76,1,76,1,76,1,76,1,76,1,77,1,77,1,77,
  	1,77,1,78,1,78,1,78,1,78,1,79,1,79,1,79,3,79,1044,8,79,1,80,5,80,1047,
  	8,80,10,80,12,80,1050,9,80,1,80,1,80,5,80,1054,8,80,10,80,12,80,1057,
  	9,80,1,81,1,81,3,81,1061,8,81,1,81,1,81,1,81,5,81,1066,8,81,10,81,12,
  	81,1069,9,81,1,81,1,81,1,82,1,82,3,82,1075,8,82,1,83,1,83,1,83,1,83,5,
  	83,1081,8,83,10,83,12,83,1084,9,83,1,83,1,83,1,84,1,84,1,84,3,84,1091,
  	8,84,1,85,1,85,1,85,1,85,1,85,1,85,3,85,1099,8,85,1,86,1,86,1,86,1,86,
  	1,87,1,87,1,87,1,87,1,88,1,88,3,88,1111,8,88,1,88,3,88,1114,8,88,1,88,
  	1,88,1,88,5,88,1119,8,88,10,88,12,88,1122,9,88,1,88,1,88,1,89,1,89,1,
  	89,3,89,1129,8,89,1,89,1,89,1,89,5,89,1134,8,89,10,89,12,89,1137,9,89,
  	1,89,1,89,1,90,1,90,3,90,1143,8,90,1,90,1,90,1,90,5,90,1148,8,90,10,90,
  	12,90,1151,9,90,1,90,1,90,1,91,3,91,1156,8,91,1,91,1,91,1,91,1,91,1,92,
  	1,92,1,92,1,92,3,92,1166,8,92,1,92,1,92,5,92,1170,8,92,10,92,12,92,1173,
  	9,92,1,92,1,92,1,93,1,93,3,93,1179,8,93,1,93,1,93,1,93,5,93,1184,8,93,
  	10,93,12,93,1187,9,93,1,93,1,93,1,94,1,94,1,94,1,94,1,94,1,94,1,94,3,
  	94,1198,8,94,1,95,1,95,3,95,1202,8,95,1,95,1,95,1,95,5,95,1207,8,95,10,
  	95,12,95,1210,9,95,1,95,1,95,1,96,1,96,1,96,1,96,3,96,1218,8,96,1,97,
  	1,97,1,97,5,97,1223,8,97,10,97,12,97,1226,9,97,1,97,1,97,1,97,3,97,1231,
  	8,97,1,98,1,98,1,98,1,98,1,98,3,98,1238,8,98,1,99,1,99,1,99,1,100,1,100,
  	3,100,1245,8,100,1,101,1,101,1,101,1,101,1,102,1,102,1,102,3,102,1254,
  	8,102,1,103,1,103,1,103,1,103,1,104,1,104,1,104,3,104,1263,8,104,1,105,
  	1,105,3,105,1267,8,105,1,105,5,105,1270,8,105,10,105,12,105,1273,9,105,
  	1,105,1,105,1,106,1,106,1,106,1,106,1,106,1,106,1,106,1,107,1,107,1,107,
  	1,107,3,107,1288,8,107,1,108,1,108,3,108,1292,8,108,1,109,5,109,1295,
  	8,109,10,109,12,109,1298,9,109,1,109,1,109,1,110,1,110,1,110,1,110,3,
  	110,1306,8,110,1,110,5,110,1309,8,110,10,110,12,110,1312,9,110,1,110,
  	1,110,1,110,5,110,1317,8,110,10,110,12,110,1320,9,110,1,110,1,110,1,110,
  	1,111,1,111,1,111,3,111,1328,8,111,1,112,1,112,3,112,1332,8,112,1,113,
  	1,113,1,114,1,114,3,114,1338,8,114,1,115,5,115,1341,8,115,10,115,12,115,
  	1344,9,115,1,115,1,115,1,116,1,116,3,116,1350,8,116,1,116,1,116,5,116,
  	1354,8,116,10,116,12,116,1357,9,116,1,116,1,116,1,116,3,116,1362,8,116,
  	3,116,1364,8,116,1,116,1,116,3,116,1368,8,116,1,116,1,116,1,116,1,116,
  	5,116,1374,8,116,10,116,12,116,1377,9,116,1,116,5,116,1380,8,116,10,116,
  	12,116,1383,9,116,1,116,1,116,1,116,1,117,1,117,1,117,3,117,1391,8,117,
  	1,118,1,118,3,118,1395,8,118,1,118,1,118,1,118,5,118,1400,8,118,10,118,
  	12,118,1403,9,118,1,118,1,118,1,119,1,119,1,119,3,119,1410,8,119,1,120,
  	1,120,3,120,1414,8,120,1,120,1,120,1,120,5,120,1419,8,120,10,120,12,120,
  	1422,9,120,1,120,1,120,1,121,1,121,3,121,1428,8,121,1,122,1,122,1,122,
  	3,122,1433,8,122,1,123,1,123,1,123,3,123,1438,8,123,1,123,1,123,1,123,
  	5,123,1443,8,123,10,123,12,123,1446,9,123,1,123,1,123,1,124,1,124,1,125,
  	1,125,1,125,3,125,1455,8,125,1,125,3,125,1458,8,125,1,125,1,125,1,125,
  	3,125,1463,8,125,1,125,1,125,1,125,5,125,1468,8,125,10,125,12,125,1471,
  	9,125,1,125,1,125,1,125,1,126,1,126,1,127,1,127,3,127,1480,8,127,1,127,
  	1,127,5,127,1484,8,127,10,127,12,127,1487,9,127,1,127,1,127,3,127,1491,
  	8,127,1,127,1,127,3,127,1495,8,127,1,127,1,127,5,127,1499,8,127,10,127,
  	12,127,1502,9,127,1,127,5,127,1505,8,127,10,127,12,127,1508,9,127,1,127,
  	1,127,1,128,5,128,1513,8,128,10,128,12,128,1516,9,128,1,128,1,128,1,129,
  	5,129,1521,8,129,10,129,12,129,1524,9,129,1,129,1,129,5,129,1528,8,129,
  	10,129,12,129,1531,9,129,1,130,1,130,1,130,5,130,1536,8,130,10,130,12,
  	130,1539,9,130,1,130,1,130,3,130,1543,8,130,1,130,5,130,1546,8,130,10,
  	130,12,130,1549,9,130,1,130,1,130,1,131,1,131,1,131,1,131,3,131,1557,
  	8,131,1,131,5,131,1560,8,131,10,131,12,131,1563,9,131,1,131,1,131,1,132,
  	1,132,1,132,3,132,1570,8,132,1,133,1,133,1,133,1,133,3,133,1576,8,133,
  	1,134,1,134,1,134,5,134,1581,8,134,10,134,12,134,1584,9,134,1,135,5,135,
  	1587,8,135,10,135,12,135,1590,9,135,1,135,1,135,1,136,1,136,1,136,1,136,
  	1,136,1,136,1,136,1,136,5,136,1602,8,136,10,136,12,136,1605,9,136,1,136,
  	1,136,1,136,1,137,5,137,1611,8,137,10,137,12,137,1614,9,137,1,137,1,137,
  	1,138,1,138,1,138,1,138,5,138,1622,8,138,10,138,12,138,1625,9,138,1,138,
  	1,138,1,139,1,139,1,139,1,139,3,139,1633,8,139,1,139,1,139,1,139,3,139,
  	1638,8,139,1,140,4,140,1641,8,140,11,140,12,140,1642,1,141,1,141,1,141,
  	1,141,5,141,1649,8,141,10,141,12,141,1652,9,141,1,142,1,142,1,142,1,142,
  	1,142,1,142,5,142,1660,8,142,10,142,12,142,1663,9,142,1,142,1,142,1,143,
  	1,143,1,143,1,143,1,143,1,143,5,143,1673,8,143,10,143,12,143,1676,9,143,
  	1,143,1,143,1,144,1,144,1,144,3,144,1683,8,144,1,144,1,144,5,144,1687,
  	8,144,10,144,12,144,1690,9,144,1,144,1,144,1,145,1,145,1,145,1,145,3,
  	145,1698,8,145,1,146,1,146,3,146,1702,8,146,1,147,1,147,3,147,1706,8,
  	147,1,147,1,147,1,147,1,147,1,147,3,147,1713,8,147,1,147,1,147,1,147,
  	1,147,1,147,1,147,1,147,1,147,1,148,1,148,1,148,1,148,1,148,4,148,1728,
  	8,148,11,148,12,148,1729,1,148,1,148,3,148,1734,8,148,1,149,1,149,1,149,
  	1,149,1,150,1,150,1,150,1,150,1,150,1,150,1,151,1,151,1,151,3,151,1749,
  	8,151,1,151,1,151,4,151,1753,8,151,11,151,12,151,1754,3,151,1757,8,151,
  	1,151,3,151,1760,8,151,1,151,3,151,1763,8,151,1,151,1,151,1,152,1,152,
  	1,152,1,152,1,152,3,152,1772,8,152,1,152,1,152,1,152,1,153,1,153,1,153,
  	5,153,1780,8,153,10,153,12,153,1783,9,153,1,153,1,153,1,153,4,153,1788,
  	8,153,11,153,12,153,1789,1,154,1,154,1,154,1,154,5,154,1796,8,154,10,
  	154,12,154,1799,9,154,1,154,1,154,1,155,1,155,1,155,1,155,1,155,1,155,
  	3,155,1809,8,155,1,156,1,156,1,156,3,156,1814,8,156,1,156,1,156,1,156,
  	1,156,3,156,1820,8,156,1,156,1,156,1,156,3,156,1825,8,156,1,156,1,156,
  	3,156,1829,8,156,1,156,1,156,5,156,1833,8,156,10,156,12,156,1836,9,156,
  	1,156,3,156,1839,8,156,1,157,1,157,1,157,3,157,1844,8,157,1,157,1,157,
  	1,157,3,157,1849,8,157,1,158,1,158,1,158,1,158,1,159,1,159,1,159,1,159,
  	1,160,1,160,1,160,1,160,1,160,1,160,3,160,1865,8,160,1,160,1,160,1,160,
  	1,160,1,160,3,160,1872,8,160,1,160,1,160,1,160,1,160,1,160,1,161,1,161,
  	1,161,1,161,3,161,1883,8,161,1,162,1,162,3,162,1887,8,162,1,162,1,162,
  	1,162,3,162,1892,8,162,1,162,1,162,1,162,1,162,1,162,1,162,3,162,1900,
  	8,162,1,163,1,163,1,163,5,163,1905,8,163,10,163,12,163,1908,9,163,1,164,
  	1,164,3,164,1912,8,164,1,165,1,165,1,165,1,165,1,166,1,166,1,166,1,166,
  	1,166,1,166,1,166,1,166,3,166,1926,8,166,1,167,1,167,1,167,1,167,3,167,
  	1932,8,167,1,168,1,168,3,168,1936,8,168,1,169,1,169,1,169,1,169,5,169,
  	1942,8,169,10,169,12,169,1945,9,169,1,169,1,169,1,170,1,170,1,170,1,170,
  	1,170,1,170,3,170,1955,8,170,1,170,1,170,5,170,1959,8,170,10,170,12,170,
  	1962,9,170,1,170,1,170,3,170,1966,8,170,1,170,1,170,1,170,1,170,1,170,
  	1,170,1,170,1,170,1,170,1,170,1,170,3,170,1979,8,170,1,170,1,170,1,170,
  	3,170,1984,8,170,1,171,1,171,3,171,1988,8,171,1,171,1,171,5,171,1992,
  	8,171,10,171,12,171,1995,9,171,1,171,1,171,1,171,1,172,1,172,1,172,1,
  	172,1,172,1,172,4,172,2006,8,172,11,172,12,172,2007,1,173,1,173,1,173,
  	5,173,2013,8,173,10,173,12,173,2016,9,173,1,174,1,174,1,174,1,174,5,174,
  	2022,8,174,10,174,12,174,2025,9,174,1,174,1,174,1,175,5,175,2030,8,175,
  	10,175,12,175,2033,9,175,1,175,1,175,1,175,1,175,1,175,1,175,1,175,1,
  	175,4,175,2043,8,175,11,175,12,175,2044,1,176,1,176,1,176,5,176,2050,
  	8,176,10,176,12,176,2053,9,176,1,177,1,177,1,178,1,178,1,178,5,178,2060,
  	8,178,10,178,12,178,2063,9,178,1,179,1,179,1,179,5,179,2068,8,179,10,
  	179,12,179,2071,9,179,1,180,1,180,1,180,5,180,2076,8,180,10,180,12,180,
  	2079,9,180,1,181,1,181,1,181,5,181,2084,8,181,10,181,12,181,2087,9,181,
  	1,182,1,182,1,182,5,182,2092,8,182,10,182,12,182,2095,9,182,1,183,1,183,
  	1,183,1,183,1,183,5,183,2102,8,183,10,183,12,183,2105,9,183,1,184,1,184,
  	1,184,5,184,2110,8,184,10,184,12,184,2113,9,184,1,185,1,185,1,185,3,185,
  	2118,8,185,1,185,3,185,2121,8,185,1,186,1,186,1,186,1,186,1,187,1,187,
  	1,187,1,187,1,187,1,187,1,187,3,187,2134,8,187,1,188,1,188,3,188,2138,
  	8,188,1,189,1,189,1,189,1,189,5,189,2144,8,189,10,189,12,189,2147,9,189,
  	3,189,2149,8,189,1,189,1,189,1,190,1,190,1,190,1,191,3,191,2157,8,191,
  	1,191,5,191,2160,8,191,10,191,12,191,2163,9,191,1,192,1,192,1,192,1,192,
  	3,192,2169,8,192,1,193,1,193,1,193,3,193,2174,8,193,1,194,1,194,1,194,
  	1,194,1,195,1,195,3,195,2182,8,195,1,195,1,195,1,195,1,195,3,195,2188,
  	8,195,1,196,1,196,3,196,2192,8,196,1,196,1,196,3,196,2196,8,196,1,196,
  	1,196,4,196,2200,8,196,11,196,12,196,2201,1,196,1,196,1,197,1,197,1,197,
  	1,197,3,197,2210,8,197,1,198,1,198,1,198,1,199,1,199,1,199,1,199,1,199,
  	1,199,3,199,2221,8,199,1,200,1,200,1,200,3,200,2226,8,200,1,201,1,201,
  	1,201,3,201,2231,8,201,1,201,1,201,1,202,1,202,1,203,3,203,2238,8,203,
  	1,203,1,203,1,203,1,203,1,204,1,204,3,204,2246,8,204,1,205,1,205,1,205,
  	1,205,1,205,1,205,1,205,1,205,1,205,5,205,2257,8,205,10,205,12,205,2260,
  	9,205,1,205,1,205,3,205,2264,8,205,1,205,1,205,1,206,1,206,1,206,1,206,
  	4,206,2272,8,206,11,206,12,206,2273,1,206,1,206,3,206,2278,8,206,1,206,
  	1,206,1,207,1,207,1,207,1,207,1,208,1,208,1,208,5,208,2289,8,208,10,208,
  	12,208,2292,9,208,1,209,1,209,3,209,2296,8,209,1,210,1,210,1,210,1,210,
  	1,210,3,210,2303,8,210,1,211,1,211,1,211,1,211,1,211,1,211,1,211,1,211,
  	1,212,1,212,1,212,1,212,1,212,3,212,2318,8,212,1,213,1,213,1,213,1,213,
  	1,213,1,213,1,214,1,214,1,214,1,214,1,214,1,214,1,215,1,215,1,216,1,216,
  	1,217,1,217,1,218,1,218,1,219,1,219,1,220,1,220,1,221,1,221,1,222,1,222,
  	1,223,1,223,1,224,1,224,1,225,1,225,1,226,1,226,1,227,1,227,1,228,1,228,
  	1,229,1,229,1,230,1,230,1,231,1,231,1,232,1,232,1,233,1,233,1,234,1,234,
  	1,235,1,235,1,236,1,236,1,237,1,237,1,238,1,238,1,239,1,239,1,240,1,240,
  	1,241,1,241,1,242,1,242,1,243,1,243,1,244,1,244,1,245,1,245,1,245,0,0,
  	246,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,
  	48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,
  	94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,
  	130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,
  	166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,
  	202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,
  	238,240,242,244,246,248,250,252,254,256,258,260,262,264,266,268,270,272,
  	274,276,278,280,282,284,286,288,290,292,294,296,298,300,302,304,306,308,
  	310,312,314,316,318,320,322,324,326,328,330,332,334,336,338,340,342,344,
  	346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,376,378,380,
  	382,384,386,388,390,392,394,396,398,400,402,404,406,408,410,412,414,416,
  	418,420,422,424,426,428,430,432,434,436,438,440,442,444,446,448,450,452,
  	454,456,458,460,462,464,466,468,470,472,474,476,478,480,482,484,486,488,
  	490,0,18,1,0,2,5,4,0,10,10,19,19,24,24,29,29,2,0,1,1,3,5,1,0,30,31,1,
  	0,32,35,1,0,38,39,1,0,54,55,1,0,56,57,2,0,54,55,61,61,2,0,54,54,61,61,
  	1,0,34,35,1,0,74,75,2,0,86,88,115,115,2,0,120,120,164,164,1,0,165,166,
  	1,0,167,170,1,0,171,172,2,0,95,96,145,145,2505,0,498,1,0,0,0,2,508,1,
  	0,0,0,4,512,1,0,0,0,6,516,1,0,0,0,8,522,1,0,0,0,10,528,1,0,0,0,12,534,
  	1,0,0,0,14,540,1,0,0,0,16,546,1,0,0,0,18,548,1,0,0,0,20,552,1,0,0,0,22,
  	556,1,0,0,0,24,558,1,0,0,0,26,560,1,0,0,0,28,564,1,0,0,0,30,571,1,0,0,
  	0,32,573,1,0,0,0,34,591,1,0,0,0,36,596,1,0,0,0,38,601,1,0,0,0,40,618,
  	1,0,0,0,42,620,1,0,0,0,44,627,1,0,0,0,46,632,1,0,0,0,48,639,1,0,0,0,50,
  	641,1,0,0,0,52,645,1,0,0,0,54,662,1,0,0,0,56,664,1,0,0,0,58,668,1,0,0,
  	0,60,677,1,0,0,0,62,709,1,0,0,0,64,715,1,0,0,0,66,726,1,0,0,0,68,730,
  	1,0,0,0,70,734,1,0,0,0,72,741,1,0,0,0,74,746,1,0,0,0,76,751,1,0,0,0,78,
  	765,1,0,0,0,80,778,1,0,0,0,82,780,1,0,0,0,84,791,1,0,0,0,86,793,1,0,0,
  	0,88,800,1,0,0,0,90,807,1,0,0,0,92,809,1,0,0,0,94,814,1,0,0,0,96,827,
  	1,0,0,0,98,842,1,0,0,0,100,853,1,0,0,0,102,862,1,0,0,0,104,869,1,0,0,
  	0,106,873,1,0,0,0,108,879,1,0,0,0,110,888,1,0,0,0,112,895,1,0,0,0,114,
  	897,1,0,0,0,116,906,1,0,0,0,118,913,1,0,0,0,120,921,1,0,0,0,122,930,1,
  	0,0,0,124,938,1,0,0,0,126,940,1,0,0,0,128,947,1,0,0,0,130,958,1,0,0,0,
  	132,960,1,0,0,0,134,963,1,0,0,0,136,965,1,0,0,0,138,982,1,0,0,0,140,986,
  	1,0,0,0,142,988,1,0,0,0,144,997,1,0,0,0,146,1002,1,0,0,0,148,1006,1,0,
  	0,0,150,1010,1,0,0,0,152,1018,1,0,0,0,154,1032,1,0,0,0,156,1036,1,0,0,
  	0,158,1040,1,0,0,0,160,1048,1,0,0,0,162,1058,1,0,0,0,164,1074,1,0,0,0,
  	166,1076,1,0,0,0,168,1090,1,0,0,0,170,1092,1,0,0,0,172,1100,1,0,0,0,174,
  	1104,1,0,0,0,176,1108,1,0,0,0,178,1125,1,0,0,0,180,1140,1,0,0,0,182,1155,
  	1,0,0,0,184,1161,1,0,0,0,186,1176,1,0,0,0,188,1190,1,0,0,0,190,1199,1,
  	0,0,0,192,1213,1,0,0,0,194,1230,1,0,0,0,196,1237,1,0,0,0,198,1239,1,0,
  	0,0,200,1244,1,0,0,0,202,1246,1,0,0,0,204,1250,1,0,0,0,206,1255,1,0,0,
  	0,208,1259,1,0,0,0,210,1264,1,0,0,0,212,1276,1,0,0,0,214,1287,1,0,0,0,
  	216,1291,1,0,0,0,218,1296,1,0,0,0,220,1301,1,0,0,0,222,1327,1,0,0,0,224,
  	1331,1,0,0,0,226,1333,1,0,0,0,228,1337,1,0,0,0,230,1342,1,0,0,0,232,1347,
  	1,0,0,0,234,1390,1,0,0,0,236,1392,1,0,0,0,238,1409,1,0,0,0,240,1411,1,
  	0,0,0,242,1427,1,0,0,0,244,1432,1,0,0,0,246,1434,1,0,0,0,248,1449,1,0,
  	0,0,250,1451,1,0,0,0,252,1475,1,0,0,0,254,1477,1,0,0,0,256,1514,1,0,0,
  	0,258,1522,1,0,0,0,260,1532,1,0,0,0,262,1552,1,0,0,0,264,1566,1,0,0,0,
  	266,1575,1,0,0,0,268,1577,1,0,0,0,270,1588,1,0,0,0,272,1593,1,0,0,0,274,
  	1612,1,0,0,0,276,1617,1,0,0,0,278,1628,1,0,0,0,280,1640,1,0,0,0,282,1644,
  	1,0,0,0,284,1653,1,0,0,0,286,1666,1,0,0,0,288,1679,1,0,0,0,290,1697,1,
  	0,0,0,292,1701,1,0,0,0,294,1703,1,0,0,0,296,1733,1,0,0,0,298,1735,1,0,
  	0,0,300,1739,1,0,0,0,302,1745,1,0,0,0,304,1766,1,0,0,0,306,1781,1,0,0,
  	0,308,1791,1,0,0,0,310,1802,1,0,0,0,312,1838,1,0,0,0,314,1843,1,0,0,0,
  	316,1850,1,0,0,0,318,1854,1,0,0,0,320,1858,1,0,0,0,322,1882,1,0,0,0,324,
  	1884,1,0,0,0,326,1901,1,0,0,0,328,1911,1,0,0,0,330,1913,1,0,0,0,332,1925,
  	1,0,0,0,334,1931,1,0,0,0,336,1935,1,0,0,0,338,1937,1,0,0,0,340,1948,1,
  	0,0,0,342,1985,1,0,0,0,344,2005,1,0,0,0,346,2009,1,0,0,0,348,2017,1,0,
  	0,0,350,2031,1,0,0,0,352,2046,1,0,0,0,354,2054,1,0,0,0,356,2056,1,0,0,
  	0,358,2064,1,0,0,0,360,2072,1,0,0,0,362,2080,1,0,0,0,364,2088,1,0,0,0,
  	366,2096,1,0,0,0,368,2106,1,0,0,0,370,2120,1,0,0,0,372,2122,1,0,0,0,374,
  	2133,1,0,0,0,376,2135,1,0,0,0,378,2139,1,0,0,0,380,2152,1,0,0,0,382,2161,
  	1,0,0,0,384,2168,1,0,0,0,386,2173,1,0,0,0,388,2175,1,0,0,0,390,2181,1,
  	0,0,0,392,2191,1,0,0,0,394,2209,1,0,0,0,396,2211,1,0,0,0,398,2220,1,0,
  	0,0,400,2225,1,0,0,0,402,2230,1,0,0,0,404,2234,1,0,0,0,406,2237,1,0,0,
  	0,408,2245,1,0,0,0,410,2247,1,0,0,0,412,2267,1,0,0,0,414,2281,1,0,0,0,
  	416,2285,1,0,0,0,418,2295,1,0,0,0,420,2302,1,0,0,0,422,2304,1,0,0,0,424,
  	2312,1,0,0,0,426,2319,1,0,0,0,428,2325,1,0,0,0,430,2331,1,0,0,0,432,2333,
  	1,0,0,0,434,2335,1,0,0,0,436,2337,1,0,0,0,438,2339,1,0,0,0,440,2341,1,
  	0,0,0,442,2343,1,0,0,0,444,2345,1,0,0,0,446,2347,1,0,0,0,448,2349,1,0,
  	0,0,450,2351,1,0,0,0,452,2353,1,0,0,0,454,2355,1,0,0,0,456,2357,1,0,0,
  	0,458,2359,1,0,0,0,460,2361,1,0,0,0,462,2363,1,0,0,0,464,2365,1,0,0,0,
  	466,2367,1,0,0,0,468,2369,1,0,0,0,470,2371,1,0,0,0,472,2373,1,0,0,0,474,
  	2375,1,0,0,0,476,2377,1,0,0,0,478,2379,1,0,0,0,480,2381,1,0,0,0,482,2383,
  	1,0,0,0,484,2385,1,0,0,0,486,2387,1,0,0,0,488,2389,1,0,0,0,490,2391,1,
  	0,0,0,492,497,3,350,175,0,493,497,3,272,136,0,494,497,3,280,140,0,495,
  	497,3,302,151,0,496,492,1,0,0,0,496,493,1,0,0,0,496,494,1,0,0,0,496,495,
  	1,0,0,0,497,500,1,0,0,0,498,496,1,0,0,0,498,499,1,0,0,0,499,501,1,0,0,
  	0,500,498,1,0,0,0,501,502,5,0,0,1,502,1,1,0,0,0,503,509,3,4,2,0,504,509,
  	3,16,8,0,505,509,3,18,9,0,506,509,3,20,10,0,507,509,3,10,5,0,508,503,
  	1,0,0,0,508,504,1,0,0,0,508,505,1,0,0,0,508,506,1,0,0,0,508,507,1,0,0,
  	0,509,3,1,0,0,0,510,513,3,6,3,0,511,513,3,8,4,0,512,510,1,0,0,0,512,511,
  	1,0,0,0,513,5,1,0,0,0,514,515,5,30,0,0,515,517,5,160,0,0,516,514,1,0,
  	0,0,516,517,1,0,0,0,517,518,1,0,0,0,518,519,7,0,0,0,519,7,1,0,0,0,520,
  	521,5,31,0,0,521,523,5,160,0,0,522,520,1,0,0,0,522,523,1,0,0,0,523,524,
  	1,0,0,0,524,525,5,6,0,0,525,9,1,0,0,0,526,527,5,38,0,0,527,529,5,160,
  	0,0,528,526,1,0,0,0,528,529,1,0,0,0,529,530,1,0,0,0,530,531,5,7,0,0,531,
  	11,1,0,0,0,532,533,5,66,0,0,533,535,5,160,0,0,534,532,1,0,0,0,534,535,
  	1,0,0,0,535,536,1,0,0,0,536,537,5,8,0,0,537,13,1,0,0,0,538,539,5,67,0,
  	0,539,541,5,160,0,0,540,538,1,0,0,0,540,541,1,0,0,0,541,542,1,0,0,0,542,
  	543,5,9,0,0,543,15,1,0,0,0,544,547,3,12,6,0,545,547,3,14,7,0,546,544,
  	1,0,0,0,546,545,1,0,0,0,547,17,1,0,0,0,548,549,7,1,0,0,549,19,1,0,0,0,
  	550,551,5,39,0,0,551,553,5,160,0,0,552,550,1,0,0,0,552,553,1,0,0,0,553,
  	554,1,0,0,0,554,555,7,2,0,0,555,21,1,0,0,0,556,557,7,3,0,0,557,23,1,0,
  	0,0,558,559,7,4,0,0,559,25,1,0,0,0,560,561,7,5,0,0,561,27,1,0,0,0,562,
  	565,3,30,15,0,563,565,3,34,17,0,564,562,1,0,0,0,564,563,1,0,0,0,565,29,
  	1,0,0,0,566,572,3,22,11,0,567,572,3,26,13,0,568,572,3,24,12,0,569,572,
  	5,37,0,0,570,572,5,36,0,0,571,566,1,0,0,0,571,567,1,0,0,0,571,568,1,0,
  	0,0,571,569,1,0,0,0,571,570,1,0,0,0,572,31,1,0,0,0,573,574,3,484,242,
  	0,574,575,5,150,0,0,575,33,1,0,0,0,576,578,3,32,16,0,577,576,1,0,0,0,
  	578,581,1,0,0,0,579,577,1,0,0,0,579,580,1,0,0,0,580,582,1,0,0,0,581,579,
  	1,0,0,0,582,592,3,430,215,0,583,592,3,432,216,0,584,592,3,434,217,0,585,
  	592,3,436,218,0,586,592,3,438,219,0,587,592,3,24,12,0,588,592,3,458,229,
  	0,589,592,3,444,222,0,590,592,3,462,231,0,591,579,1,0,0,0,591,583,1,0,
  	0,0,591,584,1,0,0,0,591,585,1,0,0,0,591,586,1,0,0,0,591,587,1,0,0,0,591,
  	588,1,0,0,0,591,589,1,0,0,0,591,590,1,0,0,0,592,35,1,0,0,0,593,595,3,
  	32,16,0,594,593,1,0,0,0,595,598,1,0,0,0,596,594,1,0,0,0,596,597,1,0,0,
  	0,597,599,1,0,0,0,598,596,1,0,0,0,599,600,3,438,219,0,600,37,1,0,0,0,
  	601,605,5,40,0,0,602,603,3,40,20,0,603,604,5,151,0,0,604,606,1,0,0,0,
  	605,602,1,0,0,0,606,607,1,0,0,0,607,605,1,0,0,0,607,608,1,0,0,0,608,609,
  	1,0,0,0,609,610,5,41,0,0,610,39,1,0,0,0,611,619,3,42,21,0,612,619,3,50,
  	25,0,613,619,3,58,29,0,614,619,3,68,34,0,615,619,3,86,43,0,616,619,3,
  	102,51,0,617,619,3,104,52,0,618,611,1,0,0,0,618,612,1,0,0,0,618,613,1,
  	0,0,0,618,614,1,0,0,0,618,615,1,0,0,0,618,616,1,0,0,0,618,617,1,0,0,0,
  	619,41,1,0,0,0,620,621,3,430,215,0,621,622,5,152,0,0,622,623,3,46,23,
  	0,623,43,1,0,0,0,624,626,3,32,16,0,625,624,1,0,0,0,626,629,1,0,0,0,627,
  	625,1,0,0,0,627,628,1,0,0,0,628,630,1,0,0,0,629,627,1,0,0,0,630,631,3,
  	430,215,0,631,45,1,0,0,0,632,635,3,48,24,0,633,634,5,153,0,0,634,636,
  	3,354,177,0,635,633,1,0,0,0,635,636,1,0,0,0,636,47,1,0,0,0,637,640,3,
  	30,15,0,638,640,3,44,22,0,639,637,1,0,0,0,639,638,1,0,0,0,640,49,1,0,
  	0,0,641,642,3,432,216,0,642,643,5,152,0,0,643,644,3,52,26,0,644,51,1,
  	0,0,0,645,648,3,54,27,0,646,647,5,153,0,0,647,649,5,2,0,0,648,646,1,0,
  	0,0,648,649,1,0,0,0,649,53,1,0,0,0,650,651,5,30,0,0,651,652,5,154,0,0,
  	652,653,3,56,28,0,653,654,5,155,0,0,654,663,1,0,0,0,655,657,3,32,16,0,
  	656,655,1,0,0,0,657,660,1,0,0,0,658,656,1,0,0,0,658,659,1,0,0,0,659,661,
  	1,0,0,0,660,658,1,0,0,0,661,663,3,432,216,0,662,650,1,0,0,0,662,658,1,
  	0,0,0,663,55,1,0,0,0,664,665,3,354,177,0,665,666,5,156,0,0,666,667,3,
  	354,177,0,667,57,1,0,0,0,668,669,3,434,217,0,669,675,5,152,0,0,670,672,
  	3,30,15,0,671,670,1,0,0,0,671,672,1,0,0,0,672,673,1,0,0,0,673,676,3,60,
  	30,0,674,676,3,62,31,0,675,671,1,0,0,0,675,674,1,0,0,0,676,59,1,0,0,0,
  	677,678,5,154,0,0,678,683,3,64,32,0,679,680,5,158,0,0,680,682,3,64,32,
  	0,681,679,1,0,0,0,682,685,1,0,0,0,683,681,1,0,0,0,683,684,1,0,0,0,684,
  	686,1,0,0,0,685,683,1,0,0,0,686,689,5,155,0,0,687,688,5,153,0,0,688,690,
  	3,66,33,0,689,687,1,0,0,0,689,690,1,0,0,0,690,61,1,0,0,0,691,692,5,154,
  	0,0,692,697,3,490,245,0,693,694,5,158,0,0,694,696,3,490,245,0,695,693,
  	1,0,0,0,696,699,1,0,0,0,697,695,1,0,0,0,697,698,1,0,0,0,698,700,1,0,0,
  	0,699,697,1,0,0,0,700,701,5,155,0,0,701,710,1,0,0,0,702,704,3,32,16,0,
  	703,702,1,0,0,0,704,707,1,0,0,0,705,703,1,0,0,0,705,706,1,0,0,0,706,708,
  	1,0,0,0,707,705,1,0,0,0,708,710,3,434,217,0,709,691,1,0,0,0,709,705,1,
  	0,0,0,710,713,1,0,0,0,711,712,5,153,0,0,712,714,3,66,33,0,713,711,1,0,
  	0,0,713,714,1,0,0,0,714,63,1,0,0,0,715,721,3,490,245,0,716,719,5,153,
  	0,0,717,720,3,6,3,0,718,720,3,354,177,0,719,717,1,0,0,0,719,718,1,0,0,
  	0,720,722,1,0,0,0,721,716,1,0,0,0,721,722,1,0,0,0,722,65,1,0,0,0,723,
  	724,3,434,217,0,724,725,5,160,0,0,725,727,1,0,0,0,726,723,1,0,0,0,726,
  	727,1,0,0,0,727,728,1,0,0,0,728,729,3,490,245,0,729,67,1,0,0,0,730,731,
  	3,436,218,0,731,732,5,152,0,0,732,733,3,70,35,0,733,69,1,0,0,0,734,737,
  	3,72,36,0,735,736,5,153,0,0,736,738,3,78,39,0,737,735,1,0,0,0,737,738,
  	1,0,0,0,738,71,1,0,0,0,739,742,3,74,37,0,740,742,3,76,38,0,741,739,1,
  	0,0,0,741,740,1,0,0,0,742,73,1,0,0,0,743,745,3,32,16,0,744,743,1,0,0,
  	0,745,748,1,0,0,0,746,744,1,0,0,0,746,747,1,0,0,0,747,749,1,0,0,0,748,
  	746,1,0,0,0,749,750,3,436,218,0,750,75,1,0,0,0,751,752,5,42,0,0,752,753,
  	5,161,0,0,753,758,3,56,28,0,754,755,5,158,0,0,755,757,3,56,28,0,756,754,
  	1,0,0,0,757,760,1,0,0,0,758,756,1,0,0,0,758,759,1,0,0,0,759,761,1,0,0,
  	0,760,758,1,0,0,0,761,762,5,162,0,0,762,763,5,43,0,0,763,764,3,28,14,
  	0,764,77,1,0,0,0,765,766,5,161,0,0,766,771,3,80,40,0,767,768,5,158,0,
  	0,768,770,3,80,40,0,769,767,1,0,0,0,770,773,1,0,0,0,771,769,1,0,0,0,771,
  	772,1,0,0,0,772,774,1,0,0,0,773,771,1,0,0,0,774,775,5,162,0,0,775,79,
  	1,0,0,0,776,779,3,84,42,0,777,779,3,82,41,0,778,776,1,0,0,0,778,777,1,
  	0,0,0,779,81,1,0,0,0,780,781,5,1,0,0,781,783,5,154,0,0,782,784,3,84,42,
  	0,783,782,1,0,0,0,783,784,1,0,0,0,784,785,1,0,0,0,785,786,5,155,0,0,786,
  	83,1,0,0,0,787,792,3,354,177,0,788,792,3,66,33,0,789,792,3,98,49,0,790,
  	792,3,78,39,0,791,787,1,0,0,0,791,788,1,0,0,0,791,789,1,0,0,0,791,790,
  	1,0,0,0,792,85,1,0,0,0,793,794,3,438,219,0,794,795,5,152,0,0,795,796,
  	3,90,45,0,796,87,1,0,0,0,797,799,3,32,16,0,798,797,1,0,0,0,799,802,1,
  	0,0,0,800,798,1,0,0,0,800,801,1,0,0,0,801,803,1,0,0,0,802,800,1,0,0,0,
  	803,804,3,438,219,0,804,89,1,0,0,0,805,808,3,94,47,0,806,808,3,92,46,
  	0,807,805,1,0,0,0,807,806,1,0,0,0,808,91,1,0,0,0,809,812,3,88,44,0,810,
  	811,5,153,0,0,811,813,3,98,49,0,812,810,1,0,0,0,812,813,1,0,0,0,813,93,
  	1,0,0,0,814,816,5,44,0,0,815,817,5,46,0,0,816,815,1,0,0,0,816,817,1,0,
  	0,0,817,821,1,0,0,0,818,819,3,96,48,0,819,820,5,151,0,0,820,822,1,0,0,
  	0,821,818,1,0,0,0,822,823,1,0,0,0,823,821,1,0,0,0,823,824,1,0,0,0,824,
  	825,1,0,0,0,825,826,5,45,0,0,826,95,1,0,0,0,827,832,3,440,220,0,828,830,
  	3,198,99,0,829,831,5,123,0,0,830,829,1,0,0,0,830,831,1,0,0,0,831,833,
  	1,0,0,0,832,828,1,0,0,0,832,833,1,0,0,0,833,834,1,0,0,0,834,840,5,152,
  	0,0,835,841,3,46,23,0,836,841,3,52,26,0,837,841,3,62,31,0,838,841,3,70,
  	35,0,839,841,3,92,46,0,840,835,1,0,0,0,840,836,1,0,0,0,840,837,1,0,0,
  	0,840,838,1,0,0,0,840,839,1,0,0,0,841,97,1,0,0,0,842,843,5,154,0,0,843,
  	848,3,100,50,0,844,845,5,158,0,0,845,847,3,100,50,0,846,844,1,0,0,0,847,
  	850,1,0,0,0,848,846,1,0,0,0,848,849,1,0,0,0,849,851,1,0,0,0,850,848,1,
  	0,0,0,851,852,5,155,0,0,852,99,1,0,0,0,853,854,3,440,220,0,854,860,5,
  	153,0,0,855,861,3,354,177,0,856,861,3,66,33,0,857,861,3,78,39,0,858,861,
  	3,98,49,0,859,861,3,112,56,0,860,855,1,0,0,0,860,856,1,0,0,0,860,857,
  	1,0,0,0,860,858,1,0,0,0,860,859,1,0,0,0,861,101,1,0,0,0,862,863,3,24,
  	12,0,863,864,5,152,0,0,864,867,3,24,12,0,865,866,5,153,0,0,866,868,3,
  	12,6,0,867,865,1,0,0,0,867,868,1,0,0,0,868,103,1,0,0,0,869,870,3,444,
  	222,0,870,871,5,152,0,0,871,872,3,106,53,0,872,105,1,0,0,0,873,876,3,
  	108,54,0,874,875,5,153,0,0,875,877,3,112,56,0,876,874,1,0,0,0,876,877,
  	1,0,0,0,877,107,1,0,0,0,878,880,5,48,0,0,879,878,1,0,0,0,880,881,1,0,
  	0,0,881,879,1,0,0,0,881,882,1,0,0,0,882,883,1,0,0,0,883,884,3,28,14,0,
  	884,109,1,0,0,0,885,887,3,32,16,0,886,885,1,0,0,0,887,890,1,0,0,0,888,
  	886,1,0,0,0,888,889,1,0,0,0,889,891,1,0,0,0,890,888,1,0,0,0,891,892,3,
  	444,222,0,892,111,1,0,0,0,893,896,3,114,57,0,894,896,5,49,0,0,895,893,
  	1,0,0,0,895,894,1,0,0,0,896,113,1,0,0,0,897,898,5,50,0,0,898,902,5,154,
  	0,0,899,903,3,122,61,0,900,903,3,160,80,0,901,903,3,258,129,0,902,899,
  	1,0,0,0,902,900,1,0,0,0,902,901,1,0,0,0,903,904,1,0,0,0,904,905,5,155,
  	0,0,905,115,1,0,0,0,906,907,3,442,221,0,907,911,5,153,0,0,908,912,3,442,
  	221,0,909,912,3,118,59,0,910,912,3,112,56,0,911,908,1,0,0,0,911,909,1,
  	0,0,0,911,910,1,0,0,0,912,117,1,0,0,0,913,915,3,442,221,0,914,916,5,157,
  	0,0,915,914,1,0,0,0,916,917,1,0,0,0,917,915,1,0,0,0,917,918,1,0,0,0,918,
  	119,1,0,0,0,919,922,5,47,0,0,920,922,3,122,61,0,921,919,1,0,0,0,921,920,
  	1,0,0,0,922,121,1,0,0,0,923,924,5,51,0,0,924,931,5,150,0,0,925,927,3,
  	32,16,0,926,925,1,0,0,0,927,928,1,0,0,0,928,926,1,0,0,0,928,929,1,0,0,
  	0,929,931,1,0,0,0,930,923,1,0,0,0,930,926,1,0,0,0,930,931,1,0,0,0,931,
  	934,1,0,0,0,932,935,3,124,62,0,933,935,3,126,63,0,934,932,1,0,0,0,934,
  	933,1,0,0,0,935,123,1,0,0,0,936,939,3,446,223,0,937,939,3,118,59,0,938,
  	936,1,0,0,0,938,937,1,0,0,0,939,125,1,0,0,0,940,943,3,124,62,0,941,944,
  	3,128,64,0,942,944,3,132,66,0,943,941,1,0,0,0,943,942,1,0,0,0,944,945,
  	1,0,0,0,945,943,1,0,0,0,945,946,1,0,0,0,946,127,1,0,0,0,947,948,5,161,
  	0,0,948,953,3,130,65,0,949,950,5,158,0,0,950,952,3,130,65,0,951,949,1,
  	0,0,0,952,955,1,0,0,0,953,951,1,0,0,0,953,954,1,0,0,0,954,956,1,0,0,0,
  	955,953,1,0,0,0,956,957,5,162,0,0,957,129,1,0,0,0,958,959,3,352,176,0,
  	959,131,1,0,0,0,960,961,5,150,0,0,961,962,3,134,67,0,962,133,1,0,0,0,
  	963,964,3,124,62,0,964,135,1,0,0,0,965,967,5,52,0,0,966,968,7,6,0,0,967,
  	966,1,0,0,0,967,968,1,0,0,0,968,974,1,0,0,0,969,970,3,138,69,0,970,971,
  	5,151,0,0,971,973,1,0,0,0,972,969,1,0,0,0,973,976,1,0,0,0,974,972,1,0,
  	0,0,974,975,1,0,0,0,975,977,1,0,0,0,976,974,1,0,0,0,977,978,5,53,0,0,
  	978,137,1,0,0,0,979,983,3,140,70,0,980,983,3,144,72,0,981,983,3,154,77,
  	0,982,979,1,0,0,0,982,980,1,0,0,0,982,981,1,0,0,0,983,139,1,0,0,0,984,
  	987,3,142,71,0,985,987,3,264,132,0,986,984,1,0,0,0,986,985,1,0,0,0,987,
  	141,1,0,0,0,988,989,3,150,75,0,989,995,5,152,0,0,990,996,3,46,23,0,991,
  	996,3,106,53,0,992,996,3,70,35,0,993,996,3,92,46,0,994,996,3,158,79,0,
  	995,990,1,0,0,0,995,991,1,0,0,0,995,992,1,0,0,0,995,993,1,0,0,0,995,994,
  	1,0,0,0,996,143,1,0,0,0,997,998,3,150,75,0,998,999,5,152,0,0,999,1000,
  	5,38,0,0,1000,1001,7,7,0,0,1001,145,1,0,0,0,1002,1003,3,150,75,0,1003,
  	1004,5,152,0,0,1004,1005,3,108,54,0,1005,147,1,0,0,0,1006,1007,3,150,
  	75,0,1007,1008,5,152,0,0,1008,1009,3,270,135,0,1009,149,1,0,0,0,1010,
  	1015,3,446,223,0,1011,1012,5,158,0,0,1012,1014,3,446,223,0,1013,1011,
  	1,0,0,0,1014,1017,1,0,0,0,1015,1013,1,0,0,0,1015,1016,1,0,0,0,1016,151,
  	1,0,0,0,1017,1015,1,0,0,0,1018,1019,5,42,0,0,1019,1020,5,161,0,0,1020,
  	1025,5,176,0,0,1021,1022,5,158,0,0,1022,1024,5,176,0,0,1023,1021,1,0,
  	0,0,1024,1027,1,0,0,0,1025,1023,1,0,0,0,1025,1026,1,0,0,0,1026,1028,1,
  	0,0,0,1027,1025,1,0,0,0,1028,1029,5,162,0,0,1029,1030,5,43,0,0,1030,1031,
  	3,28,14,0,1031,153,1,0,0,0,1032,1033,3,150,75,0,1033,1034,5,152,0,0,1034,
  	1035,3,152,76,0,1035,155,1,0,0,0,1036,1037,3,150,75,0,1037,1038,5,152,
  	0,0,1038,1039,3,230,115,0,1039,157,1,0,0,0,1040,1043,3,230,115,0,1041,
  	1042,5,153,0,0,1042,1044,3,98,49,0,1043,1041,1,0,0,0,1043,1044,1,0,0,
  	0,1044,159,1,0,0,0,1045,1047,3,32,16,0,1046,1045,1,0,0,0,1047,1050,1,
  	0,0,0,1048,1046,1,0,0,0,1048,1049,1,0,0,0,1049,1051,1,0,0,0,1050,1048,
  	1,0,0,0,1051,1055,3,448,224,0,1052,1054,5,157,0,0,1053,1052,1,0,0,0,1054,
  	1057,1,0,0,0,1055,1053,1,0,0,0,1055,1056,1,0,0,0,1056,161,1,0,0,0,1057,
  	1055,1,0,0,0,1058,1060,5,58,0,0,1059,1061,7,6,0,0,1060,1059,1,0,0,0,1060,
  	1061,1,0,0,0,1061,1067,1,0,0,0,1062,1063,3,164,82,0,1063,1064,5,151,0,
  	0,1064,1066,1,0,0,0,1065,1062,1,0,0,0,1066,1069,1,0,0,0,1067,1065,1,0,
  	0,0,1067,1068,1,0,0,0,1068,1070,1,0,0,0,1069,1067,1,0,0,0,1070,1071,5,
  	53,0,0,1071,163,1,0,0,0,1072,1075,3,140,70,0,1073,1075,3,154,77,0,1074,
  	1072,1,0,0,0,1074,1073,1,0,0,0,1075,165,1,0,0,0,1076,1082,5,59,0,0,1077,
  	1078,3,168,84,0,1078,1079,5,151,0,0,1079,1081,1,0,0,0,1080,1077,1,0,0,
  	0,1081,1084,1,0,0,0,1082,1080,1,0,0,0,1082,1083,1,0,0,0,1083,1085,1,0,
  	0,0,1084,1082,1,0,0,0,1085,1086,5,53,0,0,1086,167,1,0,0,0,1087,1091,3,
  	170,85,0,1088,1091,3,154,77,0,1089,1091,3,156,78,0,1090,1087,1,0,0,0,
  	1090,1088,1,0,0,0,1090,1089,1,0,0,0,1091,169,1,0,0,0,1092,1093,3,150,
  	75,0,1093,1098,5,152,0,0,1094,1099,3,48,24,0,1095,1099,3,200,100,0,1096,
  	1099,3,172,86,0,1097,1099,3,174,87,0,1098,1094,1,0,0,0,1098,1095,1,0,
  	0,0,1098,1096,1,0,0,0,1098,1097,1,0,0,0,1099,171,1,0,0,0,1100,1101,3,
  	150,75,0,1101,1102,5,152,0,0,1102,1103,3,72,36,0,1103,173,1,0,0,0,1104,
  	1105,3,150,75,0,1105,1106,5,152,0,0,1106,1107,3,36,18,0,1107,175,1,0,
  	0,0,1108,1110,5,60,0,0,1109,1111,5,61,0,0,1110,1109,1,0,0,0,1110,1111,
  	1,0,0,0,1111,1113,1,0,0,0,1112,1114,3,252,126,0,1113,1112,1,0,0,0,1113,
  	1114,1,0,0,0,1114,1120,1,0,0,0,1115,1116,3,140,70,0,1116,1117,5,151,0,
  	0,1117,1119,1,0,0,0,1118,1115,1,0,0,0,1119,1122,1,0,0,0,1120,1118,1,0,
  	0,0,1120,1121,1,0,0,0,1121,1123,1,0,0,0,1122,1120,1,0,0,0,1123,1124,5,
  	53,0,0,1124,177,1,0,0,0,1125,1126,5,60,0,0,1126,1128,5,54,0,0,1127,1129,
  	3,252,126,0,1128,1127,1,0,0,0,1128,1129,1,0,0,0,1129,1135,1,0,0,0,1130,
  	1131,3,140,70,0,1131,1132,5,151,0,0,1132,1134,1,0,0,0,1133,1130,1,0,0,
  	0,1134,1137,1,0,0,0,1135,1133,1,0,0,0,1135,1136,1,0,0,0,1136,1138,1,0,
  	0,0,1137,1135,1,0,0,0,1138,1139,5,53,0,0,1139,179,1,0,0,0,1140,1142,5,
  	60,0,0,1141,1143,7,8,0,0,1142,1141,1,0,0,0,1142,1143,1,0,0,0,1143,1149,
  	1,0,0,0,1144,1145,3,182,91,0,1145,1146,5,151,0,0,1146,1148,1,0,0,0,1147,
  	1144,1,0,0,0,1148,1151,1,0,0,0,1149,1147,1,0,0,0,1149,1150,1,0,0,0,1150,
  	1152,1,0,0,0,1151,1149,1,0,0,0,1152,1153,5,53,0,0,1153,181,1,0,0,0,1154,
  	1156,3,446,223,0,1155,1154,1,0,0,0,1155,1156,1,0,0,0,1156,1157,1,0,0,
  	0,1157,1158,3,198,99,0,1158,1159,5,152,0,0,1159,1160,3,196,98,0,1160,
  	183,1,0,0,0,1161,1171,5,62,0,0,1162,1166,3,170,85,0,1163,1166,3,146,73,
  	0,1164,1166,3,148,74,0,1165,1162,1,0,0,0,1165,1163,1,0,0,0,1165,1164,
  	1,0,0,0,1166,1167,1,0,0,0,1167,1168,5,151,0,0,1168,1170,1,0,0,0,1169,
  	1165,1,0,0,0,1170,1173,1,0,0,0,1171,1169,1,0,0,0,1171,1172,1,0,0,0,1172,
  	1174,1,0,0,0,1173,1171,1,0,0,0,1174,1175,5,53,0,0,1175,185,1,0,0,0,1176,
  	1178,5,63,0,0,1177,1179,5,61,0,0,1178,1177,1,0,0,0,1178,1179,1,0,0,0,
  	1179,1185,1,0,0,0,1180,1181,3,188,94,0,1181,1182,5,151,0,0,1182,1184,
  	1,0,0,0,1183,1180,1,0,0,0,1184,1187,1,0,0,0,1185,1183,1,0,0,0,1185,1186,
  	1,0,0,0,1186,1188,1,0,0,0,1187,1185,1,0,0,0,1188,1189,5,53,0,0,1189,187,
  	1,0,0,0,1190,1191,3,450,225,0,1191,1197,5,152,0,0,1192,1198,3,48,24,0,
  	1193,1198,3,72,36,0,1194,1198,3,36,18,0,1195,1198,3,230,115,0,1196,1198,
  	3,110,55,0,1197,1192,1,0,0,0,1197,1193,1,0,0,0,1197,1194,1,0,0,0,1197,
  	1195,1,0,0,0,1197,1196,1,0,0,0,1198,189,1,0,0,0,1199,1201,5,64,0,0,1200,
  	1202,7,9,0,0,1201,1200,1,0,0,0,1201,1202,1,0,0,0,1202,1208,1,0,0,0,1203,
  	1204,3,192,96,0,1204,1205,5,151,0,0,1205,1207,1,0,0,0,1206,1203,1,0,0,
  	0,1207,1210,1,0,0,0,1208,1206,1,0,0,0,1208,1209,1,0,0,0,1209,1211,1,0,
  	0,0,1210,1208,1,0,0,0,1211,1212,5,53,0,0,1212,191,1,0,0,0,1213,1214,3,
  	194,97,0,1214,1217,5,152,0,0,1215,1218,3,196,98,0,1216,1218,3,230,115,
  	0,1217,1215,1,0,0,0,1217,1216,1,0,0,0,1218,193,1,0,0,0,1219,1224,3,450,
  	225,0,1220,1221,5,158,0,0,1221,1223,3,450,225,0,1222,1220,1,0,0,0,1223,
  	1226,1,0,0,0,1224,1222,1,0,0,0,1224,1225,1,0,0,0,1225,1231,1,0,0,0,1226,
  	1224,1,0,0,0,1227,1228,3,450,225,0,1228,1229,3,198,99,0,1229,1231,1,0,
  	0,0,1230,1219,1,0,0,0,1230,1227,1,0,0,0,1231,195,1,0,0,0,1232,1238,3,
  	46,23,0,1233,1238,3,70,35,0,1234,1238,3,92,46,0,1235,1238,3,204,102,0,
  	1236,1238,3,208,104,0,1237,1232,1,0,0,0,1237,1233,1,0,0,0,1237,1234,1,
  	0,0,0,1237,1235,1,0,0,0,1237,1236,1,0,0,0,1238,197,1,0,0,0,1239,1240,
  	5,65,0,0,1240,1241,5,47,0,0,1241,199,1,0,0,0,1242,1245,3,202,101,0,1243,
  	1245,3,206,103,0,1244,1242,1,0,0,0,1244,1243,1,0,0,0,1245,201,1,0,0,0,
  	1246,1247,3,150,75,0,1247,1248,5,152,0,0,1248,1249,3,204,102,0,1249,203,
  	1,0,0,0,1250,1253,5,34,0,0,1251,1252,5,153,0,0,1252,1254,5,8,0,0,1253,
  	1251,1,0,0,0,1253,1254,1,0,0,0,1254,205,1,0,0,0,1255,1256,3,150,75,0,
  	1256,1257,5,152,0,0,1257,1258,3,208,104,0,1258,207,1,0,0,0,1259,1262,
  	5,35,0,0,1260,1261,5,153,0,0,1261,1263,5,9,0,0,1262,1260,1,0,0,0,1262,
  	1263,1,0,0,0,1263,209,1,0,0,0,1264,1266,5,60,0,0,1265,1267,7,6,0,0,1266,
  	1265,1,0,0,0,1266,1267,1,0,0,0,1267,1271,1,0,0,0,1268,1270,3,212,106,
  	0,1269,1268,1,0,0,0,1270,1273,1,0,0,0,1271,1269,1,0,0,0,1271,1272,1,0,
  	0,0,1272,1274,1,0,0,0,1273,1271,1,0,0,0,1274,1275,5,53,0,0,1275,211,1,
  	0,0,0,1276,1277,3,446,223,0,1277,1278,5,65,0,0,1278,1279,5,68,0,0,1279,
  	1280,5,152,0,0,1280,1281,3,214,107,0,1281,1282,5,151,0,0,1282,213,1,0,
  	0,0,1283,1288,3,48,24,0,1284,1288,3,72,36,0,1285,1288,3,36,18,0,1286,
  	1288,7,10,0,0,1287,1283,1,0,0,0,1287,1284,1,0,0,0,1287,1285,1,0,0,0,1287,
  	1286,1,0,0,0,1288,215,1,0,0,0,1289,1292,5,69,0,0,1290,1292,3,452,226,
  	0,1291,1289,1,0,0,0,1291,1290,1,0,0,0,1292,217,1,0,0,0,1293,1295,3,32,
  	16,0,1294,1293,1,0,0,0,1295,1298,1,0,0,0,1296,1294,1,0,0,0,1296,1297,
  	1,0,0,0,1297,1299,1,0,0,0,1298,1296,1,0,0,0,1299,1300,3,216,108,0,1300,
  	219,1,0,0,0,1301,1302,5,70,0,0,1302,1305,3,452,226,0,1303,1304,5,152,
  	0,0,1304,1306,3,28,14,0,1305,1303,1,0,0,0,1305,1306,1,0,0,0,1306,1310,
  	1,0,0,0,1307,1309,3,348,174,0,1308,1307,1,0,0,0,1309,1312,1,0,0,0,1310,
  	1308,1,0,0,0,1310,1311,1,0,0,0,1311,1318,1,0,0,0,1312,1310,1,0,0,0,1313,
  	1317,3,222,111,0,1314,1317,3,224,112,0,1315,1317,3,184,92,0,1316,1313,
  	1,0,0,0,1316,1314,1,0,0,0,1316,1315,1,0,0,0,1317,1320,1,0,0,0,1318,1316,
  	1,0,0,0,1318,1319,1,0,0,0,1319,1321,1,0,0,0,1320,1318,1,0,0,0,1321,1322,
  	3,226,113,0,1322,1323,5,71,0,0,1323,221,1,0,0,0,1324,1328,3,136,68,0,
  	1325,1328,3,162,81,0,1326,1328,3,166,83,0,1327,1324,1,0,0,0,1327,1325,
  	1,0,0,0,1327,1326,1,0,0,0,1328,223,1,0,0,0,1329,1332,3,186,93,0,1330,
  	1332,3,176,88,0,1331,1329,1,0,0,0,1331,1330,1,0,0,0,1332,225,1,0,0,0,
  	1333,1334,3,382,191,0,1334,227,1,0,0,0,1335,1338,5,72,0,0,1336,1338,3,
  	454,227,0,1337,1335,1,0,0,0,1337,1336,1,0,0,0,1338,229,1,0,0,0,1339,1341,
  	3,32,16,0,1340,1339,1,0,0,0,1341,1344,1,0,0,0,1342,1340,1,0,0,0,1342,
  	1343,1,0,0,0,1343,1345,1,0,0,0,1344,1342,1,0,0,0,1345,1346,3,228,114,
  	0,1346,231,1,0,0,0,1347,1349,5,73,0,0,1348,1350,7,11,0,0,1349,1348,1,
  	0,0,0,1349,1350,1,0,0,0,1350,1351,1,0,0,0,1351,1355,3,454,227,0,1352,
  	1354,3,348,174,0,1353,1352,1,0,0,0,1354,1357,1,0,0,0,1355,1353,1,0,0,
  	0,1355,1356,1,0,0,0,1356,1363,1,0,0,0,1357,1355,1,0,0,0,1358,1361,5,76,
  	0,0,1359,1362,3,230,115,0,1360,1362,3,256,128,0,1361,1359,1,0,0,0,1361,
  	1360,1,0,0,0,1362,1364,1,0,0,0,1363,1358,1,0,0,0,1363,1364,1,0,0,0,1364,
  	1367,1,0,0,0,1365,1366,5,77,0,0,1366,1368,3,268,134,0,1367,1365,1,0,0,
  	0,1367,1368,1,0,0,0,1368,1375,1,0,0,0,1369,1374,3,234,117,0,1370,1374,
  	3,224,112,0,1371,1374,3,184,92,0,1372,1374,3,244,122,0,1373,1369,1,0,
  	0,0,1373,1370,1,0,0,0,1373,1371,1,0,0,0,1373,1372,1,0,0,0,1374,1377,1,
  	0,0,0,1375,1373,1,0,0,0,1375,1376,1,0,0,0,1376,1381,1,0,0,0,1377,1375,
  	1,0,0,0,1378,1380,3,250,125,0,1379,1378,1,0,0,0,1380,1383,1,0,0,0,1381,
  	1379,1,0,0,0,1381,1382,1,0,0,0,1382,1384,1,0,0,0,1383,1381,1,0,0,0,1384,
  	1385,3,248,124,0,1385,1386,5,78,0,0,1386,233,1,0,0,0,1387,1391,3,236,
  	118,0,1388,1391,3,240,120,0,1389,1391,3,166,83,0,1390,1387,1,0,0,0,1390,
  	1388,1,0,0,0,1390,1389,1,0,0,0,1391,235,1,0,0,0,1392,1394,5,52,0,0,1393,
  	1395,7,6,0,0,1394,1393,1,0,0,0,1394,1395,1,0,0,0,1395,1401,1,0,0,0,1396,
  	1397,3,238,119,0,1397,1398,5,151,0,0,1398,1400,1,0,0,0,1399,1396,1,0,
  	0,0,1400,1403,1,0,0,0,1401,1399,1,0,0,0,1401,1402,1,0,0,0,1402,1404,1,
  	0,0,0,1403,1401,1,0,0,0,1404,1405,5,53,0,0,1405,237,1,0,0,0,1406,1410,
  	3,140,70,0,1407,1410,3,144,72,0,1408,1410,3,154,77,0,1409,1406,1,0,0,
  	0,1409,1407,1,0,0,0,1409,1408,1,0,0,0,1410,239,1,0,0,0,1411,1413,5,58,
  	0,0,1412,1414,7,6,0,0,1413,1412,1,0,0,0,1413,1414,1,0,0,0,1414,1420,1,
  	0,0,0,1415,1416,3,242,121,0,1416,1417,5,151,0,0,1417,1419,1,0,0,0,1418,
  	1415,1,0,0,0,1419,1422,1,0,0,0,1420,1418,1,0,0,0,1420,1421,1,0,0,0,1421,
  	1423,1,0,0,0,1422,1420,1,0,0,0,1423,1424,5,53,0,0,1424,241,1,0,0,0,1425,
  	1428,3,140,70,0,1426,1428,3,154,77,0,1427,1425,1,0,0,0,1427,1426,1,0,
  	0,0,1428,243,1,0,0,0,1429,1433,3,178,89,0,1430,1433,3,246,123,0,1431,
  	1433,3,210,105,0,1432,1429,1,0,0,0,1432,1430,1,0,0,0,1432,1431,1,0,0,
  	0,1433,245,1,0,0,0,1434,1435,5,60,0,0,1435,1437,5,55,0,0,1436,1438,3,
  	252,126,0,1437,1436,1,0,0,0,1437,1438,1,0,0,0,1438,1444,1,0,0,0,1439,
  	1440,3,140,70,0,1440,1441,5,151,0,0,1441,1443,1,0,0,0,1442,1439,1,0,0,
  	0,1443,1446,1,0,0,0,1444,1442,1,0,0,0,1444,1445,1,0,0,0,1445,1447,1,0,
  	0,0,1446,1444,1,0,0,0,1447,1448,5,53,0,0,1448,247,1,0,0,0,1449,1450,3,
  	382,191,0,1450,249,1,0,0,0,1451,1452,5,79,0,0,1452,1454,3,252,126,0,1453,
  	1455,7,11,0,0,1454,1453,1,0,0,0,1454,1455,1,0,0,0,1455,1457,1,0,0,0,1456,
  	1458,5,81,0,0,1457,1456,1,0,0,0,1457,1458,1,0,0,0,1458,1459,1,0,0,0,1459,
  	1462,3,456,228,0,1460,1461,5,152,0,0,1461,1463,3,28,14,0,1462,1460,1,
  	0,0,0,1462,1463,1,0,0,0,1463,1469,1,0,0,0,1464,1468,3,222,111,0,1465,
  	1468,3,224,112,0,1466,1468,3,184,92,0,1467,1464,1,0,0,0,1467,1465,1,0,
  	0,0,1467,1466,1,0,0,0,1468,1471,1,0,0,0,1469,1467,1,0,0,0,1469,1470,1,
  	0,0,0,1470,1472,1,0,0,0,1471,1469,1,0,0,0,1472,1473,3,226,113,0,1473,
  	1474,5,80,0,0,1474,251,1,0,0,0,1475,1476,7,12,0,0,1476,253,1,0,0,0,1477,
  	1479,5,82,0,0,1478,1480,7,11,0,0,1479,1478,1,0,0,0,1479,1480,1,0,0,0,
  	1480,1481,1,0,0,0,1481,1485,3,458,229,0,1482,1484,3,348,174,0,1483,1482,
  	1,0,0,0,1484,1487,1,0,0,0,1485,1483,1,0,0,0,1485,1486,1,0,0,0,1486,1490,
  	1,0,0,0,1487,1485,1,0,0,0,1488,1489,5,76,0,0,1489,1491,3,256,128,0,1490,
  	1488,1,0,0,0,1490,1491,1,0,0,0,1491,1494,1,0,0,0,1492,1493,5,77,0,0,1493,
  	1495,3,268,134,0,1494,1492,1,0,0,0,1494,1495,1,0,0,0,1495,1500,1,0,0,
  	0,1496,1499,3,224,112,0,1497,1499,3,244,122,0,1498,1496,1,0,0,0,1498,
  	1497,1,0,0,0,1499,1502,1,0,0,0,1500,1498,1,0,0,0,1500,1501,1,0,0,0,1501,
  	1506,1,0,0,0,1502,1500,1,0,0,0,1503,1505,3,250,125,0,1504,1503,1,0,0,
  	0,1505,1508,1,0,0,0,1506,1504,1,0,0,0,1506,1507,1,0,0,0,1507,1509,1,0,
  	0,0,1508,1506,1,0,0,0,1509,1510,5,83,0,0,1510,255,1,0,0,0,1511,1513,3,
  	32,16,0,1512,1511,1,0,0,0,1513,1516,1,0,0,0,1514,1512,1,0,0,0,1514,1515,
  	1,0,0,0,1515,1517,1,0,0,0,1516,1514,1,0,0,0,1517,1518,3,458,229,0,1518,
  	257,1,0,0,0,1519,1521,3,32,16,0,1520,1519,1,0,0,0,1521,1524,1,0,0,0,1522,
  	1520,1,0,0,0,1522,1523,1,0,0,0,1523,1525,1,0,0,0,1524,1522,1,0,0,0,1525,
  	1529,3,460,230,0,1526,1528,5,157,0,0,1527,1526,1,0,0,0,1528,1531,1,0,
  	0,0,1529,1527,1,0,0,0,1529,1530,1,0,0,0,1530,259,1,0,0,0,1531,1529,1,
  	0,0,0,1532,1533,5,84,0,0,1533,1537,3,462,231,0,1534,1536,3,348,174,0,
  	1535,1534,1,0,0,0,1536,1539,1,0,0,0,1537,1535,1,0,0,0,1537,1538,1,0,0,
  	0,1538,1542,1,0,0,0,1539,1537,1,0,0,0,1540,1541,5,76,0,0,1541,1543,3,
  	268,134,0,1542,1540,1,0,0,0,1542,1543,1,0,0,0,1543,1547,1,0,0,0,1544,
  	1546,3,262,131,0,1545,1544,1,0,0,0,1546,1549,1,0,0,0,1547,1545,1,0,0,
  	0,1547,1548,1,0,0,0,1548,1550,1,0,0,0,1549,1547,1,0,0,0,1550,1551,5,85,
  	0,0,1551,261,1,0,0,0,1552,1553,5,79,0,0,1553,1556,3,456,228,0,1554,1555,
  	5,152,0,0,1555,1557,3,28,14,0,1556,1554,1,0,0,0,1556,1557,1,0,0,0,1557,
  	1561,1,0,0,0,1558,1560,3,222,111,0,1559,1558,1,0,0,0,1560,1563,1,0,0,
  	0,1561,1559,1,0,0,0,1561,1562,1,0,0,0,1562,1564,1,0,0,0,1563,1561,1,0,
  	0,0,1564,1565,5,80,0,0,1565,263,1,0,0,0,1566,1569,3,150,75,0,1567,1568,
  	5,153,0,0,1568,1570,3,266,133,0,1569,1567,1,0,0,0,1569,1570,1,0,0,0,1570,
  	265,1,0,0,0,1571,1576,3,122,61,0,1572,1576,3,160,80,0,1573,1576,3,258,
  	129,0,1574,1576,5,49,0,0,1575,1571,1,0,0,0,1575,1572,1,0,0,0,1575,1573,
  	1,0,0,0,1575,1574,1,0,0,0,1576,267,1,0,0,0,1577,1582,3,270,135,0,1578,
  	1579,5,158,0,0,1579,1581,3,270,135,0,1580,1578,1,0,0,0,1581,1584,1,0,
  	0,0,1582,1580,1,0,0,0,1582,1583,1,0,0,0,1583,269,1,0,0,0,1584,1582,1,
  	0,0,0,1585,1587,3,32,16,0,1586,1585,1,0,0,0,1587,1590,1,0,0,0,1588,1586,
  	1,0,0,0,1588,1589,1,0,0,0,1589,1591,1,0,0,0,1590,1588,1,0,0,0,1591,1592,
  	3,462,231,0,1592,271,1,0,0,0,1593,1594,5,89,0,0,1594,1603,3,464,232,0,
  	1595,1602,3,222,111,0,1596,1602,3,224,112,0,1597,1602,3,184,92,0,1598,
  	1602,3,244,122,0,1599,1602,3,180,90,0,1600,1602,3,276,138,0,1601,1595,
  	1,0,0,0,1601,1596,1,0,0,0,1601,1597,1,0,0,0,1601,1598,1,0,0,0,1601,1599,
  	1,0,0,0,1601,1600,1,0,0,0,1602,1605,1,0,0,0,1603,1601,1,0,0,0,1603,1604,
  	1,0,0,0,1604,1606,1,0,0,0,1605,1603,1,0,0,0,1606,1607,3,248,124,0,1607,
  	1608,5,90,0,0,1608,273,1,0,0,0,1609,1611,3,32,16,0,1610,1609,1,0,0,0,
  	1611,1614,1,0,0,0,1612,1610,1,0,0,0,1612,1613,1,0,0,0,1613,1615,1,0,0,
  	0,1614,1612,1,0,0,0,1615,1616,3,464,232,0,1616,275,1,0,0,0,1617,1623,
  	5,91,0,0,1618,1619,3,278,139,0,1619,1620,5,151,0,0,1620,1622,1,0,0,0,
  	1621,1618,1,0,0,0,1622,1625,1,0,0,0,1623,1621,1,0,0,0,1623,1624,1,0,0,
  	0,1624,1626,1,0,0,0,1625,1623,1,0,0,0,1626,1627,5,53,0,0,1627,277,1,0,
  	0,0,1628,1629,3,478,239,0,1629,1630,5,152,0,0,1630,1632,3,122,61,0,1631,
  	1633,5,123,0,0,1632,1631,1,0,0,0,1632,1633,1,0,0,0,1633,1634,1,0,0,0,
  	1634,1635,5,152,0,0,1635,1637,3,28,14,0,1636,1638,5,108,0,0,1637,1636,
  	1,0,0,0,1637,1638,1,0,0,0,1638,279,1,0,0,0,1639,1641,3,282,141,0,1640,
  	1639,1,0,0,0,1641,1642,1,0,0,0,1642,1640,1,0,0,0,1642,1643,1,0,0,0,1643,
  	281,1,0,0,0,1644,1650,3,284,142,0,1645,1649,3,286,143,0,1646,1649,3,294,
  	147,0,1647,1649,3,300,150,0,1648,1645,1,0,0,0,1648,1646,1,0,0,0,1648,
  	1647,1,0,0,0,1649,1652,1,0,0,0,1650,1648,1,0,0,0,1650,1651,1,0,0,0,1651,
  	283,1,0,0,0,1652,1650,1,0,0,0,1653,1654,5,92,0,0,1654,1655,3,466,233,
  	0,1655,1661,5,152,0,0,1656,1657,3,288,144,0,1657,1658,5,151,0,0,1658,
  	1660,1,0,0,0,1659,1656,1,0,0,0,1660,1663,1,0,0,0,1661,1659,1,0,0,0,1661,
  	1662,1,0,0,0,1662,1664,1,0,0,0,1663,1661,1,0,0,0,1664,1665,5,93,0,0,1665,
  	285,1,0,0,0,1666,1667,5,94,0,0,1667,1668,3,466,233,0,1668,1674,5,152,
  	0,0,1669,1670,3,288,144,0,1670,1671,5,151,0,0,1671,1673,1,0,0,0,1672,
  	1669,1,0,0,0,1673,1676,1,0,0,0,1674,1672,1,0,0,0,1674,1675,1,0,0,0,1675,
  	1677,1,0,0,0,1676,1674,1,0,0,0,1677,1678,5,93,0,0,1678,287,1,0,0,0,1679,
  	1680,3,468,234,0,1680,1682,5,154,0,0,1681,1683,3,290,145,0,1682,1681,
  	1,0,0,0,1682,1683,1,0,0,0,1683,1688,1,0,0,0,1684,1685,5,158,0,0,1685,
  	1687,3,488,244,0,1686,1684,1,0,0,0,1687,1690,1,0,0,0,1688,1686,1,0,0,
  	0,1688,1689,1,0,0,0,1689,1691,1,0,0,0,1690,1688,1,0,0,0,1691,1692,5,155,
  	0,0,1692,289,1,0,0,0,1693,1698,5,95,0,0,1694,1695,5,96,0,0,1695,1696,
  	5,158,0,0,1696,1698,3,292,146,0,1697,1693,1,0,0,0,1697,1694,1,0,0,0,1698,
  	291,1,0,0,0,1699,1702,5,10,0,0,1700,1702,3,446,223,0,1701,1699,1,0,0,
  	0,1701,1700,1,0,0,0,1702,293,1,0,0,0,1703,1705,5,97,0,0,1704,1706,3,470,
  	235,0,1705,1704,1,0,0,0,1705,1706,1,0,0,0,1706,1712,1,0,0,0,1707,1708,
  	5,154,0,0,1708,1709,5,99,0,0,1709,1710,5,153,0,0,1710,1711,5,1,0,0,1711,
  	1713,5,155,0,0,1712,1707,1,0,0,0,1712,1713,1,0,0,0,1713,1714,1,0,0,0,
  	1714,1715,5,100,0,0,1715,1716,3,296,148,0,1716,1717,5,138,0,0,1717,1718,
  	3,296,148,0,1718,1719,5,152,0,0,1719,1720,3,298,149,0,1720,1721,5,98,
  	0,0,1721,295,1,0,0,0,1722,1734,3,466,233,0,1723,1724,5,154,0,0,1724,1727,
  	3,466,233,0,1725,1726,5,158,0,0,1726,1728,3,466,233,0,1727,1725,1,0,0,
  	0,1728,1729,1,0,0,0,1729,1727,1,0,0,0,1729,1730,1,0,0,0,1730,1731,1,0,
  	0,0,1731,1732,5,155,0,0,1732,1734,1,0,0,0,1733,1722,1,0,0,0,1733,1723,
  	1,0,0,0,1734,297,1,0,0,0,1735,1736,5,153,0,0,1736,1737,3,352,176,0,1737,
  	1738,5,151,0,0,1738,299,1,0,0,0,1739,1740,5,101,0,0,1740,1741,3,468,234,
  	0,1741,1742,5,152,0,0,1742,1743,3,248,124,0,1743,1744,5,102,0,0,1744,
  	301,1,0,0,0,1745,1746,5,103,0,0,1746,1748,3,472,236,0,1747,1749,3,190,
  	95,0,1748,1747,1,0,0,0,1748,1749,1,0,0,0,1749,1756,1,0,0,0,1750,1757,
  	3,306,153,0,1751,1753,3,304,152,0,1752,1751,1,0,0,0,1753,1754,1,0,0,0,
  	1754,1752,1,0,0,0,1754,1755,1,0,0,0,1755,1757,1,0,0,0,1756,1750,1,0,0,
  	0,1756,1752,1,0,0,0,1757,1759,1,0,0,0,1758,1760,3,308,154,0,1759,1758,
  	1,0,0,0,1759,1760,1,0,0,0,1760,1762,1,0,0,0,1761,1763,3,338,169,0,1762,
  	1761,1,0,0,0,1762,1763,1,0,0,0,1763,1764,1,0,0,0,1764,1765,5,104,0,0,
  	1765,303,1,0,0,0,1766,1767,5,105,0,0,1767,1768,3,476,238,0,1768,1769,
  	5,106,0,0,1769,1771,3,474,237,0,1770,1772,3,190,95,0,1771,1770,1,0,0,
  	0,1771,1772,1,0,0,0,1772,1773,1,0,0,0,1773,1774,3,306,153,0,1774,1775,
  	5,107,0,0,1775,305,1,0,0,0,1776,1777,3,318,159,0,1777,1778,5,151,0,0,
  	1778,1780,1,0,0,0,1779,1776,1,0,0,0,1780,1783,1,0,0,0,1781,1779,1,0,0,
  	0,1781,1782,1,0,0,0,1782,1787,1,0,0,0,1783,1781,1,0,0,0,1784,1785,3,324,
  	162,0,1785,1786,5,151,0,0,1786,1788,1,0,0,0,1787,1784,1,0,0,0,1788,1789,
  	1,0,0,0,1789,1787,1,0,0,0,1789,1790,1,0,0,0,1790,307,1,0,0,0,1791,1797,
  	5,91,0,0,1792,1793,3,310,155,0,1793,1794,5,151,0,0,1794,1796,1,0,0,0,
  	1795,1792,1,0,0,0,1796,1799,1,0,0,0,1797,1795,1,0,0,0,1797,1798,1,0,0,
  	0,1798,1800,1,0,0,0,1799,1797,1,0,0,0,1800,1801,5,53,0,0,1801,309,1,0,
  	0,0,1802,1803,3,478,239,0,1803,1804,5,152,0,0,1804,1805,3,312,156,0,1805,
  	1806,5,152,0,0,1806,1808,3,28,14,0,1807,1809,5,108,0,0,1808,1807,1,0,
  	0,0,1808,1809,1,0,0,0,1809,311,1,0,0,0,1810,1811,3,476,238,0,1811,1812,
  	5,150,0,0,1812,1814,1,0,0,0,1813,1810,1,0,0,0,1813,1814,1,0,0,0,1814,
  	1815,1,0,0,0,1815,1839,5,47,0,0,1816,1817,3,476,238,0,1817,1818,5,150,
  	0,0,1818,1820,1,0,0,0,1819,1816,1,0,0,0,1819,1820,1,0,0,0,1820,1824,1,
  	0,0,0,1821,1822,3,480,240,0,1822,1823,5,150,0,0,1823,1825,1,0,0,0,1824,
  	1821,1,0,0,0,1824,1825,1,0,0,0,1825,1834,1,0,0,0,1826,1829,3,160,80,0,
  	1827,1829,3,258,129,0,1828,1826,1,0,0,0,1828,1827,1,0,0,0,1829,1830,1,
  	0,0,0,1830,1831,5,150,0,0,1831,1833,1,0,0,0,1832,1828,1,0,0,0,1833,1836,
  	1,0,0,0,1834,1832,1,0,0,0,1834,1835,1,0,0,0,1835,1837,1,0,0,0,1836,1834,
  	1,0,0,0,1837,1839,3,122,61,0,1838,1813,1,0,0,0,1838,1819,1,0,0,0,1839,
  	313,1,0,0,0,1840,1841,3,476,238,0,1841,1842,5,150,0,0,1842,1844,1,0,0,
  	0,1843,1840,1,0,0,0,1843,1844,1,0,0,0,1844,1845,1,0,0,0,1845,1848,3,450,
  	225,0,1846,1847,5,150,0,0,1847,1849,3,440,220,0,1848,1846,1,0,0,0,1848,
  	1849,1,0,0,0,1849,315,1,0,0,0,1850,1851,3,480,240,0,1851,1852,5,150,0,
  	0,1852,1853,3,122,61,0,1853,317,1,0,0,0,1854,1855,5,109,0,0,1855,1856,
  	3,482,241,0,1856,1857,3,320,160,0,1857,319,1,0,0,0,1858,1864,5,154,0,
  	0,1859,1860,5,111,0,0,1860,1861,5,153,0,0,1861,1862,3,322,161,0,1862,
  	1863,5,158,0,0,1863,1865,1,0,0,0,1864,1859,1,0,0,0,1864,1865,1,0,0,0,
  	1865,1871,1,0,0,0,1866,1867,5,110,0,0,1867,1868,5,153,0,0,1868,1869,3,
  	322,161,0,1869,1870,5,158,0,0,1870,1872,1,0,0,0,1871,1866,1,0,0,0,1871,
  	1872,1,0,0,0,1872,1873,1,0,0,0,1873,1874,5,99,0,0,1874,1875,5,153,0,0,
  	1875,1876,5,1,0,0,1876,1877,5,155,0,0,1877,321,1,0,0,0,1878,1883,3,2,
  	1,0,1879,1883,3,314,157,0,1880,1883,3,316,158,0,1881,1883,5,47,0,0,1882,
  	1878,1,0,0,0,1882,1879,1,0,0,0,1882,1880,1,0,0,0,1882,1881,1,0,0,0,1883,
  	323,1,0,0,0,1884,1886,5,89,0,0,1885,1887,7,6,0,0,1886,1885,1,0,0,0,1886,
  	1887,1,0,0,0,1887,1888,1,0,0,0,1888,1891,3,480,240,0,1889,1890,5,112,
  	0,0,1890,1892,3,482,241,0,1891,1889,1,0,0,0,1891,1892,1,0,0,0,1892,1893,
  	1,0,0,0,1893,1894,5,152,0,0,1894,1899,3,274,137,0,1895,1896,5,154,0,0,
  	1896,1897,3,326,163,0,1897,1898,5,155,0,0,1898,1900,1,0,0,0,1899,1895,
  	1,0,0,0,1899,1900,1,0,0,0,1900,325,1,0,0,0,1901,1906,3,328,164,0,1902,
  	1903,5,158,0,0,1903,1905,3,328,164,0,1904,1902,1,0,0,0,1905,1908,1,0,
  	0,0,1906,1904,1,0,0,0,1906,1907,1,0,0,0,1907,327,1,0,0,0,1908,1906,1,
  	0,0,0,1909,1912,3,330,165,0,1910,1912,3,332,166,0,1911,1909,1,0,0,0,1911,
  	1910,1,0,0,0,1912,329,1,0,0,0,1913,1914,3,160,80,0,1914,1915,5,112,0,
  	0,1915,1916,3,482,241,0,1916,331,1,0,0,0,1917,1918,3,122,61,0,1918,1919,
  	5,153,0,0,1919,1920,3,334,167,0,1920,1926,1,0,0,0,1921,1922,3,122,61,
  	0,1922,1923,5,175,0,0,1923,1924,3,336,168,0,1924,1926,1,0,0,0,1925,1917,
  	1,0,0,0,1925,1921,1,0,0,0,1926,333,1,0,0,0,1927,1932,3,2,1,0,1928,1932,
  	3,66,33,0,1929,1932,3,314,157,0,1930,1932,5,47,0,0,1931,1927,1,0,0,0,
  	1931,1928,1,0,0,0,1931,1929,1,0,0,0,1931,1930,1,0,0,0,1932,335,1,0,0,
  	0,1933,1936,3,314,157,0,1934,1936,5,47,0,0,1935,1933,1,0,0,0,1935,1934,
  	1,0,0,0,1936,337,1,0,0,0,1937,1943,5,113,0,0,1938,1939,3,340,170,0,1939,
  	1940,5,151,0,0,1940,1942,1,0,0,0,1941,1938,1,0,0,0,1942,1945,1,0,0,0,
  	1943,1941,1,0,0,0,1943,1944,1,0,0,0,1944,1946,1,0,0,0,1945,1943,1,0,0,
  	0,1946,1947,5,53,0,0,1947,339,1,0,0,0,1948,1949,3,476,238,0,1949,1950,
  	5,150,0,0,1950,1951,3,480,240,0,1951,1960,5,150,0,0,1952,1955,3,160,80,
  	0,1953,1955,3,258,129,0,1954,1952,1,0,0,0,1954,1953,1,0,0,0,1955,1956,
  	1,0,0,0,1956,1957,5,150,0,0,1957,1959,1,0,0,0,1958,1954,1,0,0,0,1959,
  	1962,1,0,0,0,1960,1958,1,0,0,0,1960,1961,1,0,0,0,1961,1983,1,0,0,0,1962,
  	1960,1,0,0,0,1963,1965,3,446,223,0,1964,1966,3,198,99,0,1965,1964,1,0,
  	0,0,1965,1966,1,0,0,0,1966,1967,1,0,0,0,1967,1968,5,152,0,0,1968,1969,
  	3,196,98,0,1969,1984,1,0,0,0,1970,1971,3,160,80,0,1971,1972,5,152,0,0,
  	1972,1973,3,230,115,0,1973,1979,1,0,0,0,1974,1975,3,258,129,0,1975,1976,
  	5,152,0,0,1976,1977,3,256,128,0,1977,1979,1,0,0,0,1978,1970,1,0,0,0,1978,
  	1974,1,0,0,0,1979,1980,1,0,0,0,1980,1981,5,153,0,0,1981,1982,3,98,49,
  	0,1982,1984,1,0,0,0,1983,1963,1,0,0,0,1983,1978,1,0,0,0,1984,341,1,0,
  	0,0,1985,1987,5,114,0,0,1986,1988,5,115,0,0,1987,1986,1,0,0,0,1987,1988,
  	1,0,0,0,1988,1989,1,0,0,0,1989,1993,3,346,173,0,1990,1992,3,348,174,0,
  	1991,1990,1,0,0,0,1992,1995,1,0,0,0,1993,1991,1,0,0,0,1993,1994,1,0,0,
  	0,1994,1996,1,0,0,0,1995,1993,1,0,0,0,1996,1997,3,344,172,0,1997,1998,
  	5,116,0,0,1998,343,1,0,0,0,1999,2006,3,38,19,0,2000,2006,3,220,110,0,
  	2001,2006,3,232,116,0,2002,2006,3,254,127,0,2003,2006,3,260,130,0,2004,
  	2006,3,342,171,0,2005,1999,1,0,0,0,2005,2000,1,0,0,0,2005,2001,1,0,0,
  	0,2005,2002,1,0,0,0,2005,2003,1,0,0,0,2005,2004,1,0,0,0,2006,2007,1,0,
  	0,0,2007,2005,1,0,0,0,2007,2008,1,0,0,0,2008,345,1,0,0,0,2009,2014,3,
  	484,242,0,2010,2011,5,150,0,0,2011,2013,3,484,242,0,2012,2010,1,0,0,0,
  	2013,2016,1,0,0,0,2014,2012,1,0,0,0,2014,2015,1,0,0,0,2015,347,1,0,0,
  	0,2016,2014,1,0,0,0,2017,2018,5,117,0,0,2018,2023,3,346,173,0,2019,2020,
  	5,158,0,0,2020,2022,3,346,173,0,2021,2019,1,0,0,0,2022,2025,1,0,0,0,2023,
  	2021,1,0,0,0,2023,2024,1,0,0,0,2024,2026,1,0,0,0,2025,2023,1,0,0,0,2026,
  	2027,5,151,0,0,2027,349,1,0,0,0,2028,2030,3,348,174,0,2029,2028,1,0,0,
  	0,2030,2033,1,0,0,0,2031,2029,1,0,0,0,2031,2032,1,0,0,0,2032,2042,1,0,
  	0,0,2033,2031,1,0,0,0,2034,2043,3,190,95,0,2035,2043,3,38,19,0,2036,2043,
  	3,308,154,0,2037,2043,3,220,110,0,2038,2043,3,232,116,0,2039,2043,3,254,
  	127,0,2040,2043,3,260,130,0,2041,2043,3,342,171,0,2042,2034,1,0,0,0,2042,
  	2035,1,0,0,0,2042,2036,1,0,0,0,2042,2037,1,0,0,0,2042,2038,1,0,0,0,2042,
  	2039,1,0,0,0,2042,2040,1,0,0,0,2042,2041,1,0,0,0,2043,2044,1,0,0,0,2044,
  	2042,1,0,0,0,2044,2045,1,0,0,0,2045,351,1,0,0,0,2046,2051,3,356,178,0,
  	2047,2048,5,118,0,0,2048,2050,3,356,178,0,2049,2047,1,0,0,0,2050,2053,
  	1,0,0,0,2051,2049,1,0,0,0,2051,2052,1,0,0,0,2052,353,1,0,0,0,2053,2051,
  	1,0,0,0,2054,2055,3,352,176,0,2055,355,1,0,0,0,2056,2061,3,358,179,0,
  	2057,2058,5,119,0,0,2058,2060,3,358,179,0,2059,2057,1,0,0,0,2060,2063,
  	1,0,0,0,2061,2059,1,0,0,0,2061,2062,1,0,0,0,2062,357,1,0,0,0,2063,2061,
  	1,0,0,0,2064,2069,3,360,180,0,2065,2066,7,13,0,0,2066,2068,3,360,180,
  	0,2067,2065,1,0,0,0,2068,2071,1,0,0,0,2069,2067,1,0,0,0,2069,2070,1,0,
  	0,0,2070,359,1,0,0,0,2071,2069,1,0,0,0,2072,2077,3,362,181,0,2073,2074,
  	7,14,0,0,2074,2076,3,362,181,0,2075,2073,1,0,0,0,2076,2079,1,0,0,0,2077,
  	2075,1,0,0,0,2077,2078,1,0,0,0,2078,361,1,0,0,0,2079,2077,1,0,0,0,2080,
  	2085,3,364,182,0,2081,2082,7,15,0,0,2082,2084,3,364,182,0,2083,2081,1,
  	0,0,0,2084,2087,1,0,0,0,2085,2083,1,0,0,0,2085,2086,1,0,0,0,2086,363,
  	1,0,0,0,2087,2085,1,0,0,0,2088,2093,3,366,183,0,2089,2090,7,16,0,0,2090,
  	2092,3,366,183,0,2091,2089,1,0,0,0,2092,2095,1,0,0,0,2093,2091,1,0,0,
  	0,2093,2094,1,0,0,0,2094,365,1,0,0,0,2095,2093,1,0,0,0,2096,2103,3,368,
  	184,0,2097,2102,5,176,0,0,2098,2102,5,173,0,0,2099,2100,5,121,0,0,2100,
  	2102,3,368,184,0,2101,2097,1,0,0,0,2101,2098,1,0,0,0,2101,2099,1,0,0,
  	0,2102,2105,1,0,0,0,2103,2101,1,0,0,0,2103,2104,1,0,0,0,2104,367,1,0,
  	0,0,2105,2103,1,0,0,0,2106,2111,3,370,185,0,2107,2108,5,163,0,0,2108,
  	2110,3,370,185,0,2109,2107,1,0,0,0,2110,2113,1,0,0,0,2111,2109,1,0,0,
  	0,2111,2112,1,0,0,0,2112,369,1,0,0,0,2113,2111,1,0,0,0,2114,2121,5,172,
  	0,0,2115,2121,5,171,0,0,2116,2118,5,122,0,0,2117,2116,1,0,0,0,2117,2118,
  	1,0,0,0,2118,2119,1,0,0,0,2119,2121,3,374,187,0,2120,2114,1,0,0,0,2120,
  	2115,1,0,0,0,2120,2117,1,0,0,0,2121,371,1,0,0,0,2122,2123,5,154,0,0,2123,
  	2124,3,352,176,0,2124,2125,5,155,0,0,2125,373,1,0,0,0,2126,2134,3,2,1,
  	0,2127,2134,3,490,245,0,2128,2134,3,66,33,0,2129,2134,3,376,188,0,2130,
  	2134,3,380,190,0,2131,2134,3,112,56,0,2132,2134,3,372,186,0,2133,2126,
  	1,0,0,0,2133,2127,1,0,0,0,2133,2128,1,0,0,0,2133,2129,1,0,0,0,2133,2130,
  	1,0,0,0,2133,2131,1,0,0,0,2133,2132,1,0,0,0,2134,375,1,0,0,0,2135,2137,
  	3,120,60,0,2136,2138,5,123,0,0,2137,2136,1,0,0,0,2137,2138,1,0,0,0,2138,
  	377,1,0,0,0,2139,2148,5,154,0,0,2140,2145,3,400,200,0,2141,2142,5,158,
  	0,0,2142,2144,3,400,200,0,2143,2141,1,0,0,0,2144,2147,1,0,0,0,2145,2143,
  	1,0,0,0,2145,2146,1,0,0,0,2146,2149,1,0,0,0,2147,2145,1,0,0,0,2148,2140,
  	1,0,0,0,2148,2149,1,0,0,0,2149,2150,1,0,0,0,2150,2151,5,155,0,0,2151,
  	379,1,0,0,0,2152,2153,3,218,109,0,2153,2154,3,378,189,0,2154,381,1,0,
  	0,0,2155,2157,3,384,192,0,2156,2155,1,0,0,0,2156,2157,1,0,0,0,2157,2158,
  	1,0,0,0,2158,2160,5,151,0,0,2159,2156,1,0,0,0,2160,2163,1,0,0,0,2161,
  	2159,1,0,0,0,2161,2162,1,0,0,0,2162,383,1,0,0,0,2163,2161,1,0,0,0,2164,
  	2169,3,386,193,0,2165,2169,3,398,199,0,2166,2169,3,408,204,0,2167,2169,
  	3,420,210,0,2168,2164,1,0,0,0,2168,2165,1,0,0,0,2168,2166,1,0,0,0,2168,
  	2167,1,0,0,0,2169,385,1,0,0,0,2170,2174,3,388,194,0,2171,2174,3,116,58,
  	0,2172,2174,3,390,195,0,2173,2170,1,0,0,0,2173,2171,1,0,0,0,2173,2172,
  	1,0,0,0,2174,387,1,0,0,0,2175,2176,3,120,60,0,2176,2177,5,153,0,0,2177,
  	2178,3,352,176,0,2178,389,1,0,0,0,2179,2182,3,442,221,0,2180,2182,3,118,
  	59,0,2181,2179,1,0,0,0,2181,2180,1,0,0,0,2182,2183,1,0,0,0,2183,2187,
  	5,174,0,0,2184,2188,3,442,221,0,2185,2188,3,118,59,0,2186,2188,3,112,
  	56,0,2187,2184,1,0,0,0,2187,2185,1,0,0,0,2187,2186,1,0,0,0,2188,391,1,
  	0,0,0,2189,2190,5,51,0,0,2190,2192,5,150,0,0,2191,2189,1,0,0,0,2191,2192,
  	1,0,0,0,2192,2199,1,0,0,0,2193,2196,3,160,80,0,2194,2196,3,258,129,0,
  	2195,2193,1,0,0,0,2195,2194,1,0,0,0,2196,2197,1,0,0,0,2197,2198,5,150,
  	0,0,2198,2200,1,0,0,0,2199,2195,1,0,0,0,2200,2201,1,0,0,0,2201,2199,1,
  	0,0,0,2201,2202,1,0,0,0,2202,2203,1,0,0,0,2203,2204,3,456,228,0,2204,
  	393,1,0,0,0,2205,2210,3,160,80,0,2206,2210,3,456,228,0,2207,2210,5,51,
  	0,0,2208,2210,3,392,196,0,2209,2205,1,0,0,0,2209,2206,1,0,0,0,2209,2207,
  	1,0,0,0,2209,2208,1,0,0,0,2210,395,1,0,0,0,2211,2212,3,394,197,0,2212,
  	2213,3,378,189,0,2213,397,1,0,0,0,2214,2221,3,380,190,0,2215,2221,3,396,
  	198,0,2216,2217,5,124,0,0,2217,2218,5,154,0,0,2218,2221,5,155,0,0,2219,
  	2221,5,125,0,0,2220,2214,1,0,0,0,2220,2215,1,0,0,0,2220,2216,1,0,0,0,
  	2220,2219,1,0,0,0,2221,399,1,0,0,0,2222,2226,3,402,201,0,2223,2226,3,
  	404,202,0,2224,2226,3,406,203,0,2225,2222,1,0,0,0,2225,2223,1,0,0,0,2225,
  	2224,1,0,0,0,2226,401,1,0,0,0,2227,2228,3,446,223,0,2228,2229,5,153,0,
  	0,2229,2231,1,0,0,0,2230,2227,1,0,0,0,2230,2231,1,0,0,0,2231,2232,1,0,
  	0,0,2232,2233,3,352,176,0,2233,403,1,0,0,0,2234,2235,3,116,58,0,2235,
  	405,1,0,0,0,2236,2238,5,122,0,0,2237,2236,1,0,0,0,2237,2238,1,0,0,0,2238,
  	2239,1,0,0,0,2239,2240,3,446,223,0,2240,2241,5,175,0,0,2241,2242,3,120,
  	60,0,2242,407,1,0,0,0,2243,2246,3,410,205,0,2244,2246,3,412,206,0,2245,
  	2243,1,0,0,0,2245,2244,1,0,0,0,2246,409,1,0,0,0,2247,2248,5,126,0,0,2248,
  	2249,3,352,176,0,2249,2250,5,127,0,0,2250,2258,3,382,191,0,2251,2252,
  	5,128,0,0,2252,2253,3,352,176,0,2253,2254,5,127,0,0,2254,2255,3,382,191,
  	0,2255,2257,1,0,0,0,2256,2251,1,0,0,0,2257,2260,1,0,0,0,2258,2256,1,0,
  	0,0,2258,2259,1,0,0,0,2259,2263,1,0,0,0,2260,2258,1,0,0,0,2261,2262,5,
  	129,0,0,2262,2264,3,382,191,0,2263,2261,1,0,0,0,2263,2264,1,0,0,0,2264,
  	2265,1,0,0,0,2265,2266,5,130,0,0,2266,411,1,0,0,0,2267,2268,5,131,0,0,
  	2268,2269,3,352,176,0,2269,2271,5,43,0,0,2270,2272,3,414,207,0,2271,2270,
  	1,0,0,0,2272,2273,1,0,0,0,2273,2271,1,0,0,0,2273,2274,1,0,0,0,2274,2277,
  	1,0,0,0,2275,2276,5,129,0,0,2276,2278,3,382,191,0,2277,2275,1,0,0,0,2277,
  	2278,1,0,0,0,2278,2279,1,0,0,0,2279,2280,5,132,0,0,2280,413,1,0,0,0,2281,
  	2282,3,416,208,0,2282,2283,5,152,0,0,2283,2284,3,382,191,0,2284,415,1,
  	0,0,0,2285,2290,3,418,209,0,2286,2287,5,158,0,0,2287,2289,3,418,209,0,
  	2288,2286,1,0,0,0,2289,2292,1,0,0,0,2290,2288,1,0,0,0,2290,2291,1,0,0,
  	0,2291,417,1,0,0,0,2292,2290,1,0,0,0,2293,2296,3,56,28,0,2294,2296,3,
  	354,177,0,2295,2293,1,0,0,0,2295,2294,1,0,0,0,2296,419,1,0,0,0,2297,2303,
  	3,422,211,0,2298,2303,3,426,213,0,2299,2303,3,428,214,0,2300,2303,5,133,
  	0,0,2301,2303,5,134,0,0,2302,2297,1,0,0,0,2302,2298,1,0,0,0,2302,2299,
  	1,0,0,0,2302,2300,1,0,0,0,2302,2301,1,0,0,0,2303,421,1,0,0,0,2304,2305,
  	5,135,0,0,2305,2306,3,486,243,0,2306,2307,5,153,0,0,2307,2308,3,424,212,
  	0,2308,2309,5,136,0,0,2309,2310,3,382,191,0,2310,2311,5,137,0,0,2311,
  	423,1,0,0,0,2312,2313,3,352,176,0,2313,2314,5,138,0,0,2314,2317,3,352,
  	176,0,2315,2316,5,139,0,0,2316,2318,3,352,176,0,2317,2315,1,0,0,0,2317,
  	2318,1,0,0,0,2318,425,1,0,0,0,2319,2320,5,140,0,0,2320,2321,3,352,176,
  	0,2321,2322,5,136,0,0,2322,2323,3,382,191,0,2323,2324,5,141,0,0,2324,
  	427,1,0,0,0,2325,2326,5,142,0,0,2326,2327,3,382,191,0,2327,2328,5,143,
  	0,0,2328,2329,3,352,176,0,2329,2330,5,144,0,0,2330,429,1,0,0,0,2331,2332,
  	3,490,245,0,2332,431,1,0,0,0,2333,2334,3,490,245,0,2334,433,1,0,0,0,2335,
  	2336,3,490,245,0,2336,435,1,0,0,0,2337,2338,3,490,245,0,2338,437,1,0,
  	0,0,2339,2340,3,490,245,0,2340,439,1,0,0,0,2341,2342,3,490,245,0,2342,
  	441,1,0,0,0,2343,2344,3,490,245,0,2344,443,1,0,0,0,2345,2346,3,490,245,
  	0,2346,445,1,0,0,0,2347,2348,3,490,245,0,2348,447,1,0,0,0,2349,2350,3,
  	490,245,0,2350,449,1,0,0,0,2351,2352,3,490,245,0,2352,451,1,0,0,0,2353,
  	2354,3,490,245,0,2354,453,1,0,0,0,2355,2356,3,490,245,0,2356,455,1,0,
  	0,0,2357,2358,3,490,245,0,2358,457,1,0,0,0,2359,2360,3,490,245,0,2360,
  	459,1,0,0,0,2361,2362,3,490,245,0,2362,461,1,0,0,0,2363,2364,3,490,245,
  	0,2364,463,1,0,0,0,2365,2366,3,490,245,0,2366,465,1,0,0,0,2367,2368,3,
  	490,245,0,2368,467,1,0,0,0,2369,2370,3,490,245,0,2370,469,1,0,0,0,2371,
  	2372,3,490,245,0,2372,471,1,0,0,0,2373,2374,3,490,245,0,2374,473,1,0,
  	0,0,2375,2376,3,490,245,0,2376,475,1,0,0,0,2377,2378,3,490,245,0,2378,
  	477,1,0,0,0,2379,2380,3,490,245,0,2380,479,1,0,0,0,2381,2382,3,490,245,
  	0,2382,481,1,0,0,0,2383,2384,3,490,245,0,2384,483,1,0,0,0,2385,2386,3,
  	490,245,0,2386,485,1,0,0,0,2387,2388,3,490,245,0,2388,487,1,0,0,0,2389,
  	2390,3,446,223,0,2390,489,1,0,0,0,2391,2392,7,17,0,0,2392,491,1,0,0,0,
  	263,496,498,508,512,516,522,528,534,540,546,552,564,571,579,591,596,607,
  	618,627,635,639,648,658,662,671,675,683,689,697,705,709,713,719,721,726,
  	737,741,746,758,771,778,783,791,800,807,812,816,823,830,832,840,848,860,
  	867,876,881,888,895,902,911,917,921,928,930,934,938,943,945,953,967,974,
  	982,986,995,1015,1025,1043,1048,1055,1060,1067,1074,1082,1090,1098,1110,
  	1113,1120,1128,1135,1142,1149,1155,1165,1171,1178,1185,1197,1201,1208,
  	1217,1224,1230,1237,1244,1253,1262,1266,1271,1287,1291,1296,1305,1310,
  	1316,1318,1327,1331,1337,1342,1349,1355,1361,1363,1367,1373,1375,1381,
  	1390,1394,1401,1409,1413,1420,1427,1432,1437,1444,1454,1457,1462,1467,
  	1469,1479,1485,1490,1494,1498,1500,1506,1514,1522,1529,1537,1542,1547,
  	1556,1561,1569,1575,1582,1588,1601,1603,1612,1623,1632,1637,1642,1648,
  	1650,1661,1674,1682,1688,1697,1701,1705,1712,1729,1733,1748,1754,1756,
  	1759,1762,1771,1781,1789,1797,1808,1813,1819,1824,1828,1834,1838,1843,
  	1848,1864,1871,1882,1886,1891,1899,1906,1911,1925,1931,1935,1943,1954,
  	1960,1965,1978,1983,1987,1993,2005,2007,2014,2023,2031,2042,2044,2051,
  	2061,2069,2077,2085,2093,2101,2103,2111,2117,2120,2133,2137,2145,2148,
  	2156,2161,2168,2173,2181,2187,2191,2195,2201,2209,2220,2225,2230,2237,
  	2245,2258,2263,2273,2277,2290,2295,2302,2317
  };
  staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0]));

  antlr4::atn::ATNDeserializer deserializer;
  staticData->atn = deserializer.deserialize(staticData->serializedATN);

  const size_t count = staticData->atn->getNumberOfDecisions();
  staticData->decisionToDFA.reserve(count);
  for (size_t i = 0; i < count; i++) { 
    staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i);
  }
  plcstparserParserStaticData = staticData.release();
}

}

PLCSTParser::PLCSTParser(TokenStream *input) : PLCSTParser(input, antlr4::atn::ParserATNSimulatorOptions()) {}

PLCSTParser::PLCSTParser(TokenStream *input, const antlr4::atn::ParserATNSimulatorOptions &options) : Parser(input) {
  PLCSTParser::initialize();
  _interpreter = new atn::ParserATNSimulator(this, *plcstparserParserStaticData->atn, plcstparserParserStaticData->decisionToDFA, plcstparserParserStaticData->sharedContextCache, options);
}

PLCSTParser::~PLCSTParser() {
  delete _interpreter;
}

const atn::ATN& PLCSTParser::getATN() const {
  return *plcstparserParserStaticData->atn;
}

std::string PLCSTParser::getGrammarFileName() const {
  return "PLCSTParser.g4";
}

const std::vector<std::string>& PLCSTParser::getRuleNames() const {
  return plcstparserParserStaticData->ruleNames;
}

const dfa::Vocabulary& PLCSTParser::getVocabulary() const {
  return plcstparserParserStaticData->vocabulary;
}

antlr4::atn::SerializedATNView PLCSTParser::getSerializedATN() const {
  return plcstparserParserStaticData->serializedATN;
}


//----------------- StartpointContext ------------------------------------------------------------------

PLCSTParser::StartpointContext::StartpointContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::StartpointContext::EOF() {
  return getToken(PLCSTParser::EOF, 0);
}

std::vector<PLCSTParser::POU_DeclContext *> PLCSTParser::StartpointContext::pOU_Decl() {
  return getRuleContexts<PLCSTParser::POU_DeclContext>();
}

PLCSTParser::POU_DeclContext* PLCSTParser::StartpointContext::pOU_Decl(size_t i) {
  return getRuleContext<PLCSTParser::POU_DeclContext>(i);
}

std::vector<PLCSTParser::Prog_DeclContext *> PLCSTParser::StartpointContext::prog_Decl() {
  return getRuleContexts<PLCSTParser::Prog_DeclContext>();
}

PLCSTParser::Prog_DeclContext* PLCSTParser::StartpointContext::prog_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Prog_DeclContext>(i);
}

std::vector<PLCSTParser::SFCContext *> PLCSTParser::StartpointContext::sFC() {
  return getRuleContexts<PLCSTParser::SFCContext>();
}

PLCSTParser::SFCContext* PLCSTParser::StartpointContext::sFC(size_t i) {
  return getRuleContext<PLCSTParser::SFCContext>(i);
}

std::vector<PLCSTParser::Config_DeclContext *> PLCSTParser::StartpointContext::config_Decl() {
  return getRuleContexts<PLCSTParser::Config_DeclContext>();
}

PLCSTParser::Config_DeclContext* PLCSTParser::StartpointContext::config_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Config_DeclContext>(i);
}


size_t PLCSTParser::StartpointContext::getRuleIndex() const {
  return PLCSTParser::RuleStartpoint;
}

void PLCSTParser::StartpointContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStartpoint(this);
}

void PLCSTParser::StartpointContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStartpoint(this);
}


std::any PLCSTParser::StartpointContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStartpoint(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::StartpointContext* PLCSTParser::startpoint() {
  StartpointContext *_localctx = _tracker.createInstance<StartpointContext>(_ctx, getState());
  enterRule(_localctx, 0, PLCSTParser::RuleStartpoint);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(498);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::TYPE || (((_la - 64) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 64)) & 10133649354916417) != 0) {
      setState(496);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case PLCSTParser::TYPE:
        case PLCSTParser::VAR_GLOBAL:
        case PLCSTParser::FUNCTION:
        case PLCSTParser::FUNCTION_BLOCK:
        case PLCSTParser::CLASS:
        case PLCSTParser::INTERFACE:
        case PLCSTParser::VAR_ACCESS:
        case PLCSTParser::NAMESPACE:
        case PLCSTParser::USING: {
          setState(492);
          pOU_Decl();
          break;
        }

        case PLCSTParser::PROGRAM: {
          setState(493);
          prog_Decl();
          break;
        }

        case PLCSTParser::INITIAL_STEP: {
          setState(494);
          sFC();
          break;
        }

        case PLCSTParser::CONFIGURATION: {
          setState(495);
          config_Decl();
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(500);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(501);
    match(PLCSTParser::EOF);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ConstantContext ------------------------------------------------------------------

PLCSTParser::ConstantContext::ConstantContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Numeric_LiteralContext* PLCSTParser::ConstantContext::numeric_Literal() {
  return getRuleContext<PLCSTParser::Numeric_LiteralContext>(0);
}

PLCSTParser::Char_LiteralContext* PLCSTParser::ConstantContext::char_Literal() {
  return getRuleContext<PLCSTParser::Char_LiteralContext>(0);
}

PLCSTParser::Time_LiteralContext* PLCSTParser::ConstantContext::time_Literal() {
  return getRuleContext<PLCSTParser::Time_LiteralContext>(0);
}

PLCSTParser::Bit_Str_LiteralContext* PLCSTParser::ConstantContext::bit_Str_Literal() {
  return getRuleContext<PLCSTParser::Bit_Str_LiteralContext>(0);
}

PLCSTParser::Bool_LiteralContext* PLCSTParser::ConstantContext::bool_Literal() {
  return getRuleContext<PLCSTParser::Bool_LiteralContext>(0);
}


size_t PLCSTParser::ConstantContext::getRuleIndex() const {
  return PLCSTParser::RuleConstant;
}

void PLCSTParser::ConstantContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConstant(this);
}

void PLCSTParser::ConstantContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConstant(this);
}


std::any PLCSTParser::ConstantContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitConstant(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::ConstantContext* PLCSTParser::constant() {
  ConstantContext *_localctx = _tracker.createInstance<ConstantContext>(_ctx, getState());
  enterRule(_localctx, 2, PLCSTParser::RuleConstant);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(508);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 2, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(503);
      numeric_Literal();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(504);
      char_Literal();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(505);
      time_Literal();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(506);
      bit_Str_Literal();
      break;
    }

    case 5: {
      enterOuterAlt(_localctx, 5);
      setState(507);
      bool_Literal();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Numeric_LiteralContext ------------------------------------------------------------------

PLCSTParser::Numeric_LiteralContext::Numeric_LiteralContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Int_LiteralContext* PLCSTParser::Numeric_LiteralContext::int_Literal() {
  return getRuleContext<PLCSTParser::Int_LiteralContext>(0);
}

PLCSTParser::Real_LiteralContext* PLCSTParser::Numeric_LiteralContext::real_Literal() {
  return getRuleContext<PLCSTParser::Real_LiteralContext>(0);
}


size_t PLCSTParser::Numeric_LiteralContext::getRuleIndex() const {
  return PLCSTParser::RuleNumeric_Literal;
}

void PLCSTParser::Numeric_LiteralContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNumeric_Literal(this);
}

void PLCSTParser::Numeric_LiteralContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNumeric_Literal(this);
}


std::any PLCSTParser::Numeric_LiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNumeric_Literal(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Numeric_LiteralContext* PLCSTParser::numeric_Literal() {
  Numeric_LiteralContext *_localctx = _tracker.createInstance<Numeric_LiteralContext>(_ctx, getState());
  enterRule(_localctx, 4, PLCSTParser::RuleNumeric_Literal);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(512);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::Signed_Int:
      case PLCSTParser::Binary_Int:
      case PLCSTParser::Octal_Int:
      case PLCSTParser::Hex_Int:
      case PLCSTParser::Int_Type_Name: {
        enterOuterAlt(_localctx, 1);
        setState(510);
        int_Literal();
        break;
      }

      case PLCSTParser::Science_real:
      case PLCSTParser::Real_Type_Name: {
        enterOuterAlt(_localctx, 2);
        setState(511);
        real_Literal();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Int_LiteralContext ------------------------------------------------------------------

PLCSTParser::Int_LiteralContext::Int_LiteralContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Int_LiteralContext::Signed_Int() {
  return getToken(PLCSTParser::Signed_Int, 0);
}

tree::TerminalNode* PLCSTParser::Int_LiteralContext::Binary_Int() {
  return getToken(PLCSTParser::Binary_Int, 0);
}

tree::TerminalNode* PLCSTParser::Int_LiteralContext::Octal_Int() {
  return getToken(PLCSTParser::Octal_Int, 0);
}

tree::TerminalNode* PLCSTParser::Int_LiteralContext::Hex_Int() {
  return getToken(PLCSTParser::Hex_Int, 0);
}

tree::TerminalNode* PLCSTParser::Int_LiteralContext::Int_Type_Name() {
  return getToken(PLCSTParser::Int_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::Int_LiteralContext::TypeSign() {
  return getToken(PLCSTParser::TypeSign, 0);
}


size_t PLCSTParser::Int_LiteralContext::getRuleIndex() const {
  return PLCSTParser::RuleInt_Literal;
}

void PLCSTParser::Int_LiteralContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInt_Literal(this);
}

void PLCSTParser::Int_LiteralContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInt_Literal(this);
}


std::any PLCSTParser::Int_LiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInt_Literal(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Int_LiteralContext* PLCSTParser::int_Literal() {
  Int_LiteralContext *_localctx = _tracker.createInstance<Int_LiteralContext>(_ctx, getState());
  enterRule(_localctx, 6, PLCSTParser::RuleInt_Literal);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(516);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Int_Type_Name) {
      setState(514);
      match(PLCSTParser::Int_Type_Name);
      setState(515);
      match(PLCSTParser::TypeSign);
    }
    setState(518);
    _la = _input->LA(1);
    if (!(((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 60) != 0)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Real_LiteralContext ------------------------------------------------------------------

PLCSTParser::Real_LiteralContext::Real_LiteralContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Real_LiteralContext::Science_real() {
  return getToken(PLCSTParser::Science_real, 0);
}

tree::TerminalNode* PLCSTParser::Real_LiteralContext::Real_Type_Name() {
  return getToken(PLCSTParser::Real_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::Real_LiteralContext::TypeSign() {
  return getToken(PLCSTParser::TypeSign, 0);
}


size_t PLCSTParser::Real_LiteralContext::getRuleIndex() const {
  return PLCSTParser::RuleReal_Literal;
}

void PLCSTParser::Real_LiteralContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterReal_Literal(this);
}

void PLCSTParser::Real_LiteralContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitReal_Literal(this);
}


std::any PLCSTParser::Real_LiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitReal_Literal(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Real_LiteralContext* PLCSTParser::real_Literal() {
  Real_LiteralContext *_localctx = _tracker.createInstance<Real_LiteralContext>(_ctx, getState());
  enterRule(_localctx, 8, PLCSTParser::RuleReal_Literal);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(522);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Real_Type_Name) {
      setState(520);
      match(PLCSTParser::Real_Type_Name);
      setState(521);
      match(PLCSTParser::TypeSign);
    }
    setState(524);
    match(PLCSTParser::Science_real);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Bool_LiteralContext ------------------------------------------------------------------

PLCSTParser::Bool_LiteralContext::Bool_LiteralContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Bool_LiteralContext::Const_bool() {
  return getToken(PLCSTParser::Const_bool, 0);
}

tree::TerminalNode* PLCSTParser::Bool_LiteralContext::Bool_Type_Name() {
  return getToken(PLCSTParser::Bool_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::Bool_LiteralContext::TypeSign() {
  return getToken(PLCSTParser::TypeSign, 0);
}


size_t PLCSTParser::Bool_LiteralContext::getRuleIndex() const {
  return PLCSTParser::RuleBool_Literal;
}

void PLCSTParser::Bool_LiteralContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterBool_Literal(this);
}

void PLCSTParser::Bool_LiteralContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitBool_Literal(this);
}


std::any PLCSTParser::Bool_LiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitBool_Literal(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Bool_LiteralContext* PLCSTParser::bool_Literal() {
  Bool_LiteralContext *_localctx = _tracker.createInstance<Bool_LiteralContext>(_ctx, getState());
  enterRule(_localctx, 10, PLCSTParser::RuleBool_Literal);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(528);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Bool_Type_Name) {
      setState(526);
      match(PLCSTParser::Bool_Type_Name);
      setState(527);
      match(PLCSTParser::TypeSign);
    }
    setState(530);
    match(PLCSTParser::Const_bool);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Char_StrContext ------------------------------------------------------------------

PLCSTParser::Char_StrContext::Char_StrContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Char_StrContext::S_Byte_Char_Str() {
  return getToken(PLCSTParser::S_Byte_Char_Str, 0);
}

tree::TerminalNode* PLCSTParser::Char_StrContext::STRING() {
  return getToken(PLCSTParser::STRING, 0);
}

tree::TerminalNode* PLCSTParser::Char_StrContext::TypeSign() {
  return getToken(PLCSTParser::TypeSign, 0);
}


size_t PLCSTParser::Char_StrContext::getRuleIndex() const {
  return PLCSTParser::RuleChar_Str;
}

void PLCSTParser::Char_StrContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterChar_Str(this);
}

void PLCSTParser::Char_StrContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitChar_Str(this);
}


std::any PLCSTParser::Char_StrContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitChar_Str(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Char_StrContext* PLCSTParser::char_Str() {
  Char_StrContext *_localctx = _tracker.createInstance<Char_StrContext>(_ctx, getState());
  enterRule(_localctx, 12, PLCSTParser::RuleChar_Str);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(534);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::STRING) {
      setState(532);
      match(PLCSTParser::STRING);
      setState(533);
      match(PLCSTParser::TypeSign);
    }
    setState(536);
    match(PLCSTParser::S_Byte_Char_Str);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WChar_StrContext ------------------------------------------------------------------

PLCSTParser::WChar_StrContext::WChar_StrContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::WChar_StrContext::D_Byte_Char_Str() {
  return getToken(PLCSTParser::D_Byte_Char_Str, 0);
}

tree::TerminalNode* PLCSTParser::WChar_StrContext::WSTRING() {
  return getToken(PLCSTParser::WSTRING, 0);
}

tree::TerminalNode* PLCSTParser::WChar_StrContext::TypeSign() {
  return getToken(PLCSTParser::TypeSign, 0);
}


size_t PLCSTParser::WChar_StrContext::getRuleIndex() const {
  return PLCSTParser::RuleWChar_Str;
}

void PLCSTParser::WChar_StrContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterWChar_Str(this);
}

void PLCSTParser::WChar_StrContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitWChar_Str(this);
}


std::any PLCSTParser::WChar_StrContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitWChar_Str(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::WChar_StrContext* PLCSTParser::wChar_Str() {
  WChar_StrContext *_localctx = _tracker.createInstance<WChar_StrContext>(_ctx, getState());
  enterRule(_localctx, 14, PLCSTParser::RuleWChar_Str);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(540);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::WSTRING) {
      setState(538);
      match(PLCSTParser::WSTRING);
      setState(539);
      match(PLCSTParser::TypeSign);
    }
    setState(542);
    match(PLCSTParser::D_Byte_Char_Str);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Char_LiteralContext ------------------------------------------------------------------

PLCSTParser::Char_LiteralContext::Char_LiteralContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Char_StrContext* PLCSTParser::Char_LiteralContext::char_Str() {
  return getRuleContext<PLCSTParser::Char_StrContext>(0);
}

PLCSTParser::WChar_StrContext* PLCSTParser::Char_LiteralContext::wChar_Str() {
  return getRuleContext<PLCSTParser::WChar_StrContext>(0);
}


size_t PLCSTParser::Char_LiteralContext::getRuleIndex() const {
  return PLCSTParser::RuleChar_Literal;
}

void PLCSTParser::Char_LiteralContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterChar_Literal(this);
}

void PLCSTParser::Char_LiteralContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitChar_Literal(this);
}


std::any PLCSTParser::Char_LiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitChar_Literal(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Char_LiteralContext* PLCSTParser::char_Literal() {
  Char_LiteralContext *_localctx = _tracker.createInstance<Char_LiteralContext>(_ctx, getState());
  enterRule(_localctx, 16, PLCSTParser::RuleChar_Literal);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(546);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::S_Byte_Char_Str:
      case PLCSTParser::STRING: {
        enterOuterAlt(_localctx, 1);
        setState(544);
        char_Str();
        break;
      }

      case PLCSTParser::D_Byte_Char_Str:
      case PLCSTParser::WSTRING: {
        enterOuterAlt(_localctx, 2);
        setState(545);
        wChar_Str();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Time_LiteralContext ------------------------------------------------------------------

PLCSTParser::Time_LiteralContext::Time_LiteralContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Time_LiteralContext::Duration() {
  return getToken(PLCSTParser::Duration, 0);
}

tree::TerminalNode* PLCSTParser::Time_LiteralContext::Time_Of_Day() {
  return getToken(PLCSTParser::Time_Of_Day, 0);
}

tree::TerminalNode* PLCSTParser::Time_LiteralContext::Date() {
  return getToken(PLCSTParser::Date, 0);
}

tree::TerminalNode* PLCSTParser::Time_LiteralContext::Date_And_Time() {
  return getToken(PLCSTParser::Date_And_Time, 0);
}


size_t PLCSTParser::Time_LiteralContext::getRuleIndex() const {
  return PLCSTParser::RuleTime_Literal;
}

void PLCSTParser::Time_LiteralContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTime_Literal(this);
}

void PLCSTParser::Time_LiteralContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTime_Literal(this);
}


std::any PLCSTParser::Time_LiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitTime_Literal(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Time_LiteralContext* PLCSTParser::time_Literal() {
  Time_LiteralContext *_localctx = _tracker.createInstance<Time_LiteralContext>(_ctx, getState());
  enterRule(_localctx, 18, PLCSTParser::RuleTime_Literal);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(548);
    _la = _input->LA(1);
    if (!(((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 554173440) != 0)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Bit_Str_LiteralContext ------------------------------------------------------------------

PLCSTParser::Bit_Str_LiteralContext::Bit_Str_LiteralContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Bit_Str_LiteralContext::Unsigned_Int() {
  return getToken(PLCSTParser::Unsigned_Int, 0);
}

tree::TerminalNode* PLCSTParser::Bit_Str_LiteralContext::Binary_Int() {
  return getToken(PLCSTParser::Binary_Int, 0);
}

tree::TerminalNode* PLCSTParser::Bit_Str_LiteralContext::Octal_Int() {
  return getToken(PLCSTParser::Octal_Int, 0);
}

tree::TerminalNode* PLCSTParser::Bit_Str_LiteralContext::Hex_Int() {
  return getToken(PLCSTParser::Hex_Int, 0);
}

tree::TerminalNode* PLCSTParser::Bit_Str_LiteralContext::Multibits_Type_Name() {
  return getToken(PLCSTParser::Multibits_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::Bit_Str_LiteralContext::TypeSign() {
  return getToken(PLCSTParser::TypeSign, 0);
}


size_t PLCSTParser::Bit_Str_LiteralContext::getRuleIndex() const {
  return PLCSTParser::RuleBit_Str_Literal;
}

void PLCSTParser::Bit_Str_LiteralContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterBit_Str_Literal(this);
}

void PLCSTParser::Bit_Str_LiteralContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitBit_Str_Literal(this);
}


std::any PLCSTParser::Bit_Str_LiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitBit_Str_Literal(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Bit_Str_LiteralContext* PLCSTParser::bit_Str_Literal() {
  Bit_Str_LiteralContext *_localctx = _tracker.createInstance<Bit_Str_LiteralContext>(_ctx, getState());
  enterRule(_localctx, 20, PLCSTParser::RuleBit_Str_Literal);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(552);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Multibits_Type_Name) {
      setState(550);
      match(PLCSTParser::Multibits_Type_Name);
      setState(551);
      match(PLCSTParser::TypeSign);
    }
    setState(554);
    _la = _input->LA(1);
    if (!(((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 58) != 0)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Numeric_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Numeric_Type_NameContext::Numeric_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Numeric_Type_NameContext::Int_Type_Name() {
  return getToken(PLCSTParser::Int_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::Numeric_Type_NameContext::Real_Type_Name() {
  return getToken(PLCSTParser::Real_Type_Name, 0);
}


size_t PLCSTParser::Numeric_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleNumeric_Type_Name;
}

void PLCSTParser::Numeric_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNumeric_Type_Name(this);
}

void PLCSTParser::Numeric_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNumeric_Type_Name(this);
}


std::any PLCSTParser::Numeric_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNumeric_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Numeric_Type_NameContext* PLCSTParser::numeric_Type_Name() {
  Numeric_Type_NameContext *_localctx = _tracker.createInstance<Numeric_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 22, PLCSTParser::RuleNumeric_Type_Name);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(556);
    _la = _input->LA(1);
    if (!(_la == PLCSTParser::Int_Type_Name

    || _la == PLCSTParser::Real_Type_Name)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- String_Type_NameContext ------------------------------------------------------------------

PLCSTParser::String_Type_NameContext::String_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::String_Type_NameContext::SString_Type_Name() {
  return getToken(PLCSTParser::SString_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::String_Type_NameContext::WString_Type_Name() {
  return getToken(PLCSTParser::WString_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::String_Type_NameContext::CHAR() {
  return getToken(PLCSTParser::CHAR, 0);
}

tree::TerminalNode* PLCSTParser::String_Type_NameContext::WCHAR() {
  return getToken(PLCSTParser::WCHAR, 0);
}


size_t PLCSTParser::String_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleString_Type_Name;
}

void PLCSTParser::String_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterString_Type_Name(this);
}

void PLCSTParser::String_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitString_Type_Name(this);
}


std::any PLCSTParser::String_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitString_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::String_Type_NameContext* PLCSTParser::string_Type_Name() {
  String_Type_NameContext *_localctx = _tracker.createInstance<String_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 24, PLCSTParser::RuleString_Type_Name);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(558);
    _la = _input->LA(1);
    if (!(((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 64424509440) != 0)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Bit_Str_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Bit_Str_Type_NameContext::Bit_Str_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Bit_Str_Type_NameContext::Bool_Type_Name() {
  return getToken(PLCSTParser::Bool_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::Bit_Str_Type_NameContext::Multibits_Type_Name() {
  return getToken(PLCSTParser::Multibits_Type_Name, 0);
}


size_t PLCSTParser::Bit_Str_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleBit_Str_Type_Name;
}

void PLCSTParser::Bit_Str_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterBit_Str_Type_Name(this);
}

void PLCSTParser::Bit_Str_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitBit_Str_Type_Name(this);
}


std::any PLCSTParser::Bit_Str_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitBit_Str_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Bit_Str_Type_NameContext* PLCSTParser::bit_Str_Type_Name() {
  Bit_Str_Type_NameContext *_localctx = _tracker.createInstance<Bit_Str_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 26, PLCSTParser::RuleBit_Str_Type_Name);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(560);
    _la = _input->LA(1);
    if (!(_la == PLCSTParser::Bool_Type_Name

    || _la == PLCSTParser::Multibits_Type_Name)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Data_Type_AccessContext ------------------------------------------------------------------

PLCSTParser::Data_Type_AccessContext::Data_Type_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Elem_Type_NameContext* PLCSTParser::Data_Type_AccessContext::elem_Type_Name() {
  return getRuleContext<PLCSTParser::Elem_Type_NameContext>(0);
}

PLCSTParser::Derived_Type_AccessContext* PLCSTParser::Data_Type_AccessContext::derived_Type_Access() {
  return getRuleContext<PLCSTParser::Derived_Type_AccessContext>(0);
}


size_t PLCSTParser::Data_Type_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleData_Type_Access;
}

void PLCSTParser::Data_Type_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterData_Type_Access(this);
}

void PLCSTParser::Data_Type_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitData_Type_Access(this);
}


std::any PLCSTParser::Data_Type_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitData_Type_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Data_Type_AccessContext* PLCSTParser::data_Type_Access() {
  Data_Type_AccessContext *_localctx = _tracker.createInstance<Data_Type_AccessContext>(_ctx, getState());
  enterRule(_localctx, 28, PLCSTParser::RuleData_Type_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(564);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 11, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(562);
      elem_Type_Name();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(563);
      derived_Type_Access();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Elem_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Elem_Type_NameContext::Elem_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Numeric_Type_NameContext* PLCSTParser::Elem_Type_NameContext::numeric_Type_Name() {
  return getRuleContext<PLCSTParser::Numeric_Type_NameContext>(0);
}

PLCSTParser::Bit_Str_Type_NameContext* PLCSTParser::Elem_Type_NameContext::bit_Str_Type_Name() {
  return getRuleContext<PLCSTParser::Bit_Str_Type_NameContext>(0);
}

PLCSTParser::String_Type_NameContext* PLCSTParser::Elem_Type_NameContext::string_Type_Name() {
  return getRuleContext<PLCSTParser::String_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Elem_Type_NameContext::Date_Type_Name() {
  return getToken(PLCSTParser::Date_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::Elem_Type_NameContext::Time_Type_Name() {
  return getToken(PLCSTParser::Time_Type_Name, 0);
}


size_t PLCSTParser::Elem_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleElem_Type_Name;
}

void PLCSTParser::Elem_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterElem_Type_Name(this);
}

void PLCSTParser::Elem_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitElem_Type_Name(this);
}


std::any PLCSTParser::Elem_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitElem_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Elem_Type_NameContext* PLCSTParser::elem_Type_Name() {
  Elem_Type_NameContext *_localctx = _tracker.createInstance<Elem_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 30, PLCSTParser::RuleElem_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(571);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::Int_Type_Name:
      case PLCSTParser::Real_Type_Name: {
        enterOuterAlt(_localctx, 1);
        setState(566);
        numeric_Type_Name();
        break;
      }

      case PLCSTParser::Bool_Type_Name:
      case PLCSTParser::Multibits_Type_Name: {
        enterOuterAlt(_localctx, 2);
        setState(567);
        bit_Str_Type_Name();
        break;
      }

      case PLCSTParser::CHAR:
      case PLCSTParser::WCHAR:
      case PLCSTParser::SString_Type_Name:
      case PLCSTParser::WString_Type_Name: {
        enterOuterAlt(_localctx, 3);
        setState(568);
        string_Type_Name();
        break;
      }

      case PLCSTParser::Date_Type_Name: {
        enterOuterAlt(_localctx, 4);
        setState(569);
        match(PLCSTParser::Date_Type_Name);
        break;
      }

      case PLCSTParser::Time_Type_Name: {
        enterOuterAlt(_localctx, 5);
        setState(570);
        match(PLCSTParser::Time_Type_Name);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- NestedNameSpecifierContext ------------------------------------------------------------------

PLCSTParser::NestedNameSpecifierContext::NestedNameSpecifierContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Namespace_NameContext* PLCSTParser::NestedNameSpecifierContext::namespace_Name() {
  return getRuleContext<PLCSTParser::Namespace_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::NestedNameSpecifierContext::Dot() {
  return getToken(PLCSTParser::Dot, 0);
}


size_t PLCSTParser::NestedNameSpecifierContext::getRuleIndex() const {
  return PLCSTParser::RuleNestedNameSpecifier;
}

void PLCSTParser::NestedNameSpecifierContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNestedNameSpecifier(this);
}

void PLCSTParser::NestedNameSpecifierContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNestedNameSpecifier(this);
}


std::any PLCSTParser::NestedNameSpecifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNestedNameSpecifier(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::nestedNameSpecifier() {
  NestedNameSpecifierContext *_localctx = _tracker.createInstance<NestedNameSpecifierContext>(_ctx, getState());
  enterRule(_localctx, 32, PLCSTParser::RuleNestedNameSpecifier);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(573);
    namespace_Name();
    setState(574);
    match(PLCSTParser::Dot);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Derived_Type_AccessContext ------------------------------------------------------------------

PLCSTParser::Derived_Type_AccessContext::Derived_Type_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Simple_Type_NameContext* PLCSTParser::Derived_Type_AccessContext::simple_Type_Name() {
  return getRuleContext<PLCSTParser::Simple_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Derived_Type_AccessContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Derived_Type_AccessContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}

PLCSTParser::Subrange_Type_NameContext* PLCSTParser::Derived_Type_AccessContext::subrange_Type_Name() {
  return getRuleContext<PLCSTParser::Subrange_Type_NameContext>(0);
}

PLCSTParser::Enum_Type_NameContext* PLCSTParser::Derived_Type_AccessContext::enum_Type_Name() {
  return getRuleContext<PLCSTParser::Enum_Type_NameContext>(0);
}

PLCSTParser::Array_Type_NameContext* PLCSTParser::Derived_Type_AccessContext::array_Type_Name() {
  return getRuleContext<PLCSTParser::Array_Type_NameContext>(0);
}

PLCSTParser::Struct_Type_NameContext* PLCSTParser::Derived_Type_AccessContext::struct_Type_Name() {
  return getRuleContext<PLCSTParser::Struct_Type_NameContext>(0);
}

PLCSTParser::String_Type_NameContext* PLCSTParser::Derived_Type_AccessContext::string_Type_Name() {
  return getRuleContext<PLCSTParser::String_Type_NameContext>(0);
}

PLCSTParser::Class_Type_NameContext* PLCSTParser::Derived_Type_AccessContext::class_Type_Name() {
  return getRuleContext<PLCSTParser::Class_Type_NameContext>(0);
}

PLCSTParser::Ref_Type_NameContext* PLCSTParser::Derived_Type_AccessContext::ref_Type_Name() {
  return getRuleContext<PLCSTParser::Ref_Type_NameContext>(0);
}

PLCSTParser::Interface_Type_NameContext* PLCSTParser::Derived_Type_AccessContext::interface_Type_Name() {
  return getRuleContext<PLCSTParser::Interface_Type_NameContext>(0);
}


size_t PLCSTParser::Derived_Type_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleDerived_Type_Access;
}

void PLCSTParser::Derived_Type_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDerived_Type_Access(this);
}

void PLCSTParser::Derived_Type_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDerived_Type_Access(this);
}


std::any PLCSTParser::Derived_Type_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitDerived_Type_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Derived_Type_AccessContext* PLCSTParser::derived_Type_Access() {
  Derived_Type_AccessContext *_localctx = _tracker.createInstance<Derived_Type_AccessContext>(_ctx, getState());
  enterRule(_localctx, 34, PLCSTParser::RuleDerived_Type_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    setState(591);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 14, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(579);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 13, _ctx);
      while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
        if (alt == 1) {
          setState(576);
          nestedNameSpecifier(); 
        }
        setState(581);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 13, _ctx);
      }
      setState(582);
      simple_Type_Name();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(583);
      subrange_Type_Name();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(584);
      enum_Type_Name();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(585);
      array_Type_Name();
      break;
    }

    case 5: {
      enterOuterAlt(_localctx, 5);
      setState(586);
      struct_Type_Name();
      break;
    }

    case 6: {
      enterOuterAlt(_localctx, 6);
      setState(587);
      string_Type_Name();
      break;
    }

    case 7: {
      enterOuterAlt(_localctx, 7);
      setState(588);
      class_Type_Name();
      break;
    }

    case 8: {
      enterOuterAlt(_localctx, 8);
      setState(589);
      ref_Type_Name();
      break;
    }

    case 9: {
      enterOuterAlt(_localctx, 9);
      setState(590);
      interface_Type_Name();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_Type_AccessContext ------------------------------------------------------------------

PLCSTParser::Struct_Type_AccessContext::Struct_Type_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Struct_Type_NameContext* PLCSTParser::Struct_Type_AccessContext::struct_Type_Name() {
  return getRuleContext<PLCSTParser::Struct_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Struct_Type_AccessContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Struct_Type_AccessContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Struct_Type_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Type_Access;
}

void PLCSTParser::Struct_Type_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Type_Access(this);
}

void PLCSTParser::Struct_Type_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Type_Access(this);
}


std::any PLCSTParser::Struct_Type_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Type_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_Type_AccessContext* PLCSTParser::struct_Type_Access() {
  Struct_Type_AccessContext *_localctx = _tracker.createInstance<Struct_Type_AccessContext>(_ctx, getState());
  enterRule(_localctx, 36, PLCSTParser::RuleStruct_Type_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(596);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 15, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(593);
        nestedNameSpecifier(); 
      }
      setState(598);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 15, _ctx);
    }
    setState(599);
    struct_Type_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Data_Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Data_Type_DeclContext::Data_Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Data_Type_DeclContext::TYPE() {
  return getToken(PLCSTParser::TYPE, 0);
}

tree::TerminalNode* PLCSTParser::Data_Type_DeclContext::END_TYPE() {
  return getToken(PLCSTParser::END_TYPE, 0);
}

std::vector<PLCSTParser::Type_DeclContext *> PLCSTParser::Data_Type_DeclContext::type_Decl() {
  return getRuleContexts<PLCSTParser::Type_DeclContext>();
}

PLCSTParser::Type_DeclContext* PLCSTParser::Data_Type_DeclContext::type_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Type_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Data_Type_DeclContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Data_Type_DeclContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::Data_Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleData_Type_Decl;
}

void PLCSTParser::Data_Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterData_Type_Decl(this);
}

void PLCSTParser::Data_Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitData_Type_Decl(this);
}


std::any PLCSTParser::Data_Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitData_Type_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Data_Type_DeclContext* PLCSTParser::data_Type_Decl() {
  Data_Type_DeclContext *_localctx = _tracker.createInstance<Data_Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 38, PLCSTParser::RuleData_Type_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(601);
    match(PLCSTParser::TYPE);
    setState(605); 
    _errHandler->sync(this);
    _la = _input->LA(1);
    do {
      setState(602);
      type_Decl();
      setState(603);
      match(PLCSTParser::Semi);
      setState(607); 
      _errHandler->sync(this);
      _la = _input->LA(1);
    } while (((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 64424509440) != 0 || (((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0);
    setState(609);
    match(PLCSTParser::END_TYPE);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Type_DeclContext::Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Simple_Type_DeclContext* PLCSTParser::Type_DeclContext::simple_Type_Decl() {
  return getRuleContext<PLCSTParser::Simple_Type_DeclContext>(0);
}

PLCSTParser::Subrange_Type_DeclContext* PLCSTParser::Type_DeclContext::subrange_Type_Decl() {
  return getRuleContext<PLCSTParser::Subrange_Type_DeclContext>(0);
}

PLCSTParser::Enum_Type_DeclContext* PLCSTParser::Type_DeclContext::enum_Type_Decl() {
  return getRuleContext<PLCSTParser::Enum_Type_DeclContext>(0);
}

PLCSTParser::Array_Type_DeclContext* PLCSTParser::Type_DeclContext::array_Type_Decl() {
  return getRuleContext<PLCSTParser::Array_Type_DeclContext>(0);
}

PLCSTParser::Struct_Type_DeclContext* PLCSTParser::Type_DeclContext::struct_Type_Decl() {
  return getRuleContext<PLCSTParser::Struct_Type_DeclContext>(0);
}

PLCSTParser::Str_Type_DeclContext* PLCSTParser::Type_DeclContext::str_Type_Decl() {
  return getRuleContext<PLCSTParser::Str_Type_DeclContext>(0);
}

PLCSTParser::Ref_Type_DeclContext* PLCSTParser::Type_DeclContext::ref_Type_Decl() {
  return getRuleContext<PLCSTParser::Ref_Type_DeclContext>(0);
}


size_t PLCSTParser::Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleType_Decl;
}

void PLCSTParser::Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterType_Decl(this);
}

void PLCSTParser::Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitType_Decl(this);
}


std::any PLCSTParser::Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitType_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Type_DeclContext* PLCSTParser::type_Decl() {
  Type_DeclContext *_localctx = _tracker.createInstance<Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 40, PLCSTParser::RuleType_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(618);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 17, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(611);
      simple_Type_Decl();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(612);
      subrange_Type_Decl();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(613);
      enum_Type_Decl();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(614);
      array_Type_Decl();
      break;
    }

    case 5: {
      enterOuterAlt(_localctx, 5);
      setState(615);
      struct_Type_Decl();
      break;
    }

    case 6: {
      enterOuterAlt(_localctx, 6);
      setState(616);
      str_Type_Decl();
      break;
    }

    case 7: {
      enterOuterAlt(_localctx, 7);
      setState(617);
      ref_Type_Decl();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Simple_Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Simple_Type_DeclContext::Simple_Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Simple_Type_NameContext* PLCSTParser::Simple_Type_DeclContext::simple_Type_Name() {
  return getRuleContext<PLCSTParser::Simple_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Simple_Type_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Simple_Spec_InitContext* PLCSTParser::Simple_Type_DeclContext::simple_Spec_Init() {
  return getRuleContext<PLCSTParser::Simple_Spec_InitContext>(0);
}


size_t PLCSTParser::Simple_Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleSimple_Type_Decl;
}

void PLCSTParser::Simple_Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSimple_Type_Decl(this);
}

void PLCSTParser::Simple_Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSimple_Type_Decl(this);
}


std::any PLCSTParser::Simple_Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSimple_Type_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Simple_Type_DeclContext* PLCSTParser::simple_Type_Decl() {
  Simple_Type_DeclContext *_localctx = _tracker.createInstance<Simple_Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 42, PLCSTParser::RuleSimple_Type_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(620);
    simple_Type_Name();
    setState(621);
    match(PLCSTParser::Colon);
    setState(622);
    simple_Spec_Init();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Nested_Simple_Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Nested_Simple_Type_DeclContext::Nested_Simple_Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Simple_Type_NameContext* PLCSTParser::Nested_Simple_Type_DeclContext::simple_Type_Name() {
  return getRuleContext<PLCSTParser::Simple_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Nested_Simple_Type_DeclContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Nested_Simple_Type_DeclContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Nested_Simple_Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleNested_Simple_Type_Decl;
}

void PLCSTParser::Nested_Simple_Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNested_Simple_Type_Decl(this);
}

void PLCSTParser::Nested_Simple_Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNested_Simple_Type_Decl(this);
}


std::any PLCSTParser::Nested_Simple_Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNested_Simple_Type_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Nested_Simple_Type_DeclContext* PLCSTParser::nested_Simple_Type_Decl() {
  Nested_Simple_Type_DeclContext *_localctx = _tracker.createInstance<Nested_Simple_Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 44, PLCSTParser::RuleNested_Simple_Type_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(627);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 18, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(624);
        nestedNameSpecifier(); 
      }
      setState(629);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 18, _ctx);
    }
    setState(630);
    simple_Type_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Simple_Spec_InitContext ------------------------------------------------------------------

PLCSTParser::Simple_Spec_InitContext::Simple_Spec_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Simple_SpecContext* PLCSTParser::Simple_Spec_InitContext::simple_Spec() {
  return getRuleContext<PLCSTParser::Simple_SpecContext>(0);
}

tree::TerminalNode* PLCSTParser::Simple_Spec_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Constant_ExprContext* PLCSTParser::Simple_Spec_InitContext::constant_Expr() {
  return getRuleContext<PLCSTParser::Constant_ExprContext>(0);
}


size_t PLCSTParser::Simple_Spec_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleSimple_Spec_Init;
}

void PLCSTParser::Simple_Spec_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSimple_Spec_Init(this);
}

void PLCSTParser::Simple_Spec_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSimple_Spec_Init(this);
}


std::any PLCSTParser::Simple_Spec_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSimple_Spec_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Simple_Spec_InitContext* PLCSTParser::simple_Spec_Init() {
  Simple_Spec_InitContext *_localctx = _tracker.createInstance<Simple_Spec_InitContext>(_ctx, getState());
  enterRule(_localctx, 46, PLCSTParser::RuleSimple_Spec_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(632);
    simple_Spec();
    setState(635);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(633);
      match(PLCSTParser::Assign);
      setState(634);
      constant_Expr();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Simple_SpecContext ------------------------------------------------------------------

PLCSTParser::Simple_SpecContext::Simple_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Elem_Type_NameContext* PLCSTParser::Simple_SpecContext::elem_Type_Name() {
  return getRuleContext<PLCSTParser::Elem_Type_NameContext>(0);
}

PLCSTParser::Nested_Simple_Type_DeclContext* PLCSTParser::Simple_SpecContext::nested_Simple_Type_Decl() {
  return getRuleContext<PLCSTParser::Nested_Simple_Type_DeclContext>(0);
}


size_t PLCSTParser::Simple_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleSimple_Spec;
}

void PLCSTParser::Simple_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSimple_Spec(this);
}

void PLCSTParser::Simple_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSimple_Spec(this);
}


std::any PLCSTParser::Simple_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSimple_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Simple_SpecContext* PLCSTParser::simple_Spec() {
  Simple_SpecContext *_localctx = _tracker.createInstance<Simple_SpecContext>(_ctx, getState());
  enterRule(_localctx, 48, PLCSTParser::RuleSimple_Spec);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(639);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::Int_Type_Name:
      case PLCSTParser::Real_Type_Name:
      case PLCSTParser::CHAR:
      case PLCSTParser::WCHAR:
      case PLCSTParser::SString_Type_Name:
      case PLCSTParser::WString_Type_Name:
      case PLCSTParser::Time_Type_Name:
      case PLCSTParser::Date_Type_Name:
      case PLCSTParser::Bool_Type_Name:
      case PLCSTParser::Multibits_Type_Name: {
        enterOuterAlt(_localctx, 1);
        setState(637);
        elem_Type_Name();
        break;
      }

      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        enterOuterAlt(_localctx, 2);
        setState(638);
        nested_Simple_Type_Decl();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Subrange_Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Subrange_Type_DeclContext::Subrange_Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Subrange_Type_NameContext* PLCSTParser::Subrange_Type_DeclContext::subrange_Type_Name() {
  return getRuleContext<PLCSTParser::Subrange_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Subrange_Type_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Subrange_Spec_InitContext* PLCSTParser::Subrange_Type_DeclContext::subrange_Spec_Init() {
  return getRuleContext<PLCSTParser::Subrange_Spec_InitContext>(0);
}


size_t PLCSTParser::Subrange_Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleSubrange_Type_Decl;
}

void PLCSTParser::Subrange_Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSubrange_Type_Decl(this);
}

void PLCSTParser::Subrange_Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSubrange_Type_Decl(this);
}


std::any PLCSTParser::Subrange_Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSubrange_Type_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Subrange_Type_DeclContext* PLCSTParser::subrange_Type_Decl() {
  Subrange_Type_DeclContext *_localctx = _tracker.createInstance<Subrange_Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 50, PLCSTParser::RuleSubrange_Type_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(641);
    subrange_Type_Name();
    setState(642);
    match(PLCSTParser::Colon);
    setState(643);
    subrange_Spec_Init();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Subrange_Spec_InitContext ------------------------------------------------------------------

PLCSTParser::Subrange_Spec_InitContext::Subrange_Spec_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Subrange_SpecContext* PLCSTParser::Subrange_Spec_InitContext::subrange_Spec() {
  return getRuleContext<PLCSTParser::Subrange_SpecContext>(0);
}

tree::TerminalNode* PLCSTParser::Subrange_Spec_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

tree::TerminalNode* PLCSTParser::Subrange_Spec_InitContext::Signed_Int() {
  return getToken(PLCSTParser::Signed_Int, 0);
}


size_t PLCSTParser::Subrange_Spec_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleSubrange_Spec_Init;
}

void PLCSTParser::Subrange_Spec_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSubrange_Spec_Init(this);
}

void PLCSTParser::Subrange_Spec_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSubrange_Spec_Init(this);
}


std::any PLCSTParser::Subrange_Spec_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSubrange_Spec_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Subrange_Spec_InitContext* PLCSTParser::subrange_Spec_Init() {
  Subrange_Spec_InitContext *_localctx = _tracker.createInstance<Subrange_Spec_InitContext>(_ctx, getState());
  enterRule(_localctx, 52, PLCSTParser::RuleSubrange_Spec_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(645);
    subrange_Spec();
    setState(648);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(646);
      match(PLCSTParser::Assign);
      setState(647);
      match(PLCSTParser::Signed_Int);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Subrange_SpecContext ------------------------------------------------------------------

PLCSTParser::Subrange_SpecContext::Subrange_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Subrange_SpecContext::Int_Type_Name() {
  return getToken(PLCSTParser::Int_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::Subrange_SpecContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

PLCSTParser::SubrangeContext* PLCSTParser::Subrange_SpecContext::subrange() {
  return getRuleContext<PLCSTParser::SubrangeContext>(0);
}

tree::TerminalNode* PLCSTParser::Subrange_SpecContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

PLCSTParser::Subrange_Type_NameContext* PLCSTParser::Subrange_SpecContext::subrange_Type_Name() {
  return getRuleContext<PLCSTParser::Subrange_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Subrange_SpecContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Subrange_SpecContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Subrange_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleSubrange_Spec;
}

void PLCSTParser::Subrange_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSubrange_Spec(this);
}

void PLCSTParser::Subrange_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSubrange_Spec(this);
}


std::any PLCSTParser::Subrange_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSubrange_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Subrange_SpecContext* PLCSTParser::subrange_Spec() {
  Subrange_SpecContext *_localctx = _tracker.createInstance<Subrange_SpecContext>(_ctx, getState());
  enterRule(_localctx, 54, PLCSTParser::RuleSubrange_Spec);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    setState(662);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::Int_Type_Name: {
        enterOuterAlt(_localctx, 1);
        setState(650);
        match(PLCSTParser::Int_Type_Name);
        setState(651);
        match(PLCSTParser::LeftParen);
        setState(652);
        subrange();
        setState(653);
        match(PLCSTParser::RightParen);
        break;
      }

      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        enterOuterAlt(_localctx, 2);
        setState(658);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 22, _ctx);
        while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
          if (alt == 1) {
            setState(655);
            nestedNameSpecifier(); 
          }
          setState(660);
          _errHandler->sync(this);
          alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 22, _ctx);
        }
        setState(661);
        subrange_Type_Name();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SubrangeContext ------------------------------------------------------------------

PLCSTParser::SubrangeContext::SubrangeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Constant_ExprContext *> PLCSTParser::SubrangeContext::constant_Expr() {
  return getRuleContexts<PLCSTParser::Constant_ExprContext>();
}

PLCSTParser::Constant_ExprContext* PLCSTParser::SubrangeContext::constant_Expr(size_t i) {
  return getRuleContext<PLCSTParser::Constant_ExprContext>(i);
}

tree::TerminalNode* PLCSTParser::SubrangeContext::RangeDot() {
  return getToken(PLCSTParser::RangeDot, 0);
}


size_t PLCSTParser::SubrangeContext::getRuleIndex() const {
  return PLCSTParser::RuleSubrange;
}

void PLCSTParser::SubrangeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSubrange(this);
}

void PLCSTParser::SubrangeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSubrange(this);
}


std::any PLCSTParser::SubrangeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSubrange(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::SubrangeContext* PLCSTParser::subrange() {
  SubrangeContext *_localctx = _tracker.createInstance<SubrangeContext>(_ctx, getState());
  enterRule(_localctx, 56, PLCSTParser::RuleSubrange);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(664);
    constant_Expr();
    setState(665);
    match(PLCSTParser::RangeDot);
    setState(666);
    constant_Expr();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Enum_Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Enum_Type_DeclContext::Enum_Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Enum_Type_NameContext* PLCSTParser::Enum_Type_DeclContext::enum_Type_Name() {
  return getRuleContext<PLCSTParser::Enum_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Enum_Type_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Enum_Spec_InitContext* PLCSTParser::Enum_Type_DeclContext::enum_Spec_Init() {
  return getRuleContext<PLCSTParser::Enum_Spec_InitContext>(0);
}

PLCSTParser::Named_Spec_InitContext* PLCSTParser::Enum_Type_DeclContext::named_Spec_Init() {
  return getRuleContext<PLCSTParser::Named_Spec_InitContext>(0);
}

PLCSTParser::Elem_Type_NameContext* PLCSTParser::Enum_Type_DeclContext::elem_Type_Name() {
  return getRuleContext<PLCSTParser::Elem_Type_NameContext>(0);
}


size_t PLCSTParser::Enum_Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleEnum_Type_Decl;
}

void PLCSTParser::Enum_Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterEnum_Type_Decl(this);
}

void PLCSTParser::Enum_Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitEnum_Type_Decl(this);
}


std::any PLCSTParser::Enum_Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitEnum_Type_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Enum_Type_DeclContext* PLCSTParser::enum_Type_Decl() {
  Enum_Type_DeclContext *_localctx = _tracker.createInstance<Enum_Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 58, PLCSTParser::RuleEnum_Type_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(668);
    enum_Type_Name();
    setState(669);
    match(PLCSTParser::Colon);
    setState(675);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 25, _ctx)) {
    case 1: {
      setState(671);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & 1098437885952) != 0) {
        setState(670);
        elem_Type_Name();
      }
      setState(673);
      named_Spec_Init();
      break;
    }

    case 2: {
      setState(674);
      enum_Spec_Init();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Named_Spec_InitContext ------------------------------------------------------------------

PLCSTParser::Named_Spec_InitContext::Named_Spec_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Named_Spec_InitContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

std::vector<PLCSTParser::Enum_Value_SpecContext *> PLCSTParser::Named_Spec_InitContext::enum_Value_Spec() {
  return getRuleContexts<PLCSTParser::Enum_Value_SpecContext>();
}

PLCSTParser::Enum_Value_SpecContext* PLCSTParser::Named_Spec_InitContext::enum_Value_Spec(size_t i) {
  return getRuleContext<PLCSTParser::Enum_Value_SpecContext>(i);
}

tree::TerminalNode* PLCSTParser::Named_Spec_InitContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Named_Spec_InitContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Named_Spec_InitContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}

tree::TerminalNode* PLCSTParser::Named_Spec_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Enum_ValueContext* PLCSTParser::Named_Spec_InitContext::enum_Value() {
  return getRuleContext<PLCSTParser::Enum_ValueContext>(0);
}


size_t PLCSTParser::Named_Spec_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleNamed_Spec_Init;
}

void PLCSTParser::Named_Spec_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNamed_Spec_Init(this);
}

void PLCSTParser::Named_Spec_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNamed_Spec_Init(this);
}


std::any PLCSTParser::Named_Spec_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNamed_Spec_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Named_Spec_InitContext* PLCSTParser::named_Spec_Init() {
  Named_Spec_InitContext *_localctx = _tracker.createInstance<Named_Spec_InitContext>(_ctx, getState());
  enterRule(_localctx, 60, PLCSTParser::RuleNamed_Spec_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(677);
    match(PLCSTParser::LeftParen);
    setState(678);
    enum_Value_Spec();
    setState(683);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(679);
      match(PLCSTParser::Comma);
      setState(680);
      enum_Value_Spec();
      setState(685);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(686);
    match(PLCSTParser::RightParen);
    setState(689);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(687);
      match(PLCSTParser::Assign);
      setState(688);
      enum_Value();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Enum_Spec_InitContext ------------------------------------------------------------------

PLCSTParser::Enum_Spec_InitContext::Enum_Spec_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Enum_Type_NameContext* PLCSTParser::Enum_Spec_InitContext::enum_Type_Name() {
  return getRuleContext<PLCSTParser::Enum_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Enum_Spec_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Enum_ValueContext* PLCSTParser::Enum_Spec_InitContext::enum_Value() {
  return getRuleContext<PLCSTParser::Enum_ValueContext>(0);
}

tree::TerminalNode* PLCSTParser::Enum_Spec_InitContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

std::vector<PLCSTParser::IdentifierContext *> PLCSTParser::Enum_Spec_InitContext::identifier() {
  return getRuleContexts<PLCSTParser::IdentifierContext>();
}

PLCSTParser::IdentifierContext* PLCSTParser::Enum_Spec_InitContext::identifier(size_t i) {
  return getRuleContext<PLCSTParser::IdentifierContext>(i);
}

tree::TerminalNode* PLCSTParser::Enum_Spec_InitContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Enum_Spec_InitContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Enum_Spec_InitContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Enum_Spec_InitContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Enum_Spec_InitContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Enum_Spec_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleEnum_Spec_Init;
}

void PLCSTParser::Enum_Spec_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterEnum_Spec_Init(this);
}

void PLCSTParser::Enum_Spec_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitEnum_Spec_Init(this);
}


std::any PLCSTParser::Enum_Spec_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitEnum_Spec_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Enum_Spec_InitContext* PLCSTParser::enum_Spec_Init() {
  Enum_Spec_InitContext *_localctx = _tracker.createInstance<Enum_Spec_InitContext>(_ctx, getState());
  enterRule(_localctx, 62, PLCSTParser::RuleEnum_Spec_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(709);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::LeftParen: {
        setState(691);
        match(PLCSTParser::LeftParen);
        setState(692);
        identifier();
        setState(697);
        _errHandler->sync(this);
        _la = _input->LA(1);
        while (_la == PLCSTParser::Comma) {
          setState(693);
          match(PLCSTParser::Comma);
          setState(694);
          identifier();
          setState(699);
          _errHandler->sync(this);
          _la = _input->LA(1);
        }
        setState(700);
        match(PLCSTParser::RightParen);
        break;
      }

      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        setState(705);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 29, _ctx);
        while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
          if (alt == 1) {
            setState(702);
            nestedNameSpecifier(); 
          }
          setState(707);
          _errHandler->sync(this);
          alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 29, _ctx);
        }
        setState(708);
        enum_Type_Name();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
    setState(713);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(711);
      match(PLCSTParser::Assign);
      setState(712);
      enum_Value();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Enum_Value_SpecContext ------------------------------------------------------------------

PLCSTParser::Enum_Value_SpecContext::Enum_Value_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Enum_Value_SpecContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}

tree::TerminalNode* PLCSTParser::Enum_Value_SpecContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Int_LiteralContext* PLCSTParser::Enum_Value_SpecContext::int_Literal() {
  return getRuleContext<PLCSTParser::Int_LiteralContext>(0);
}

PLCSTParser::Constant_ExprContext* PLCSTParser::Enum_Value_SpecContext::constant_Expr() {
  return getRuleContext<PLCSTParser::Constant_ExprContext>(0);
}


size_t PLCSTParser::Enum_Value_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleEnum_Value_Spec;
}

void PLCSTParser::Enum_Value_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterEnum_Value_Spec(this);
}

void PLCSTParser::Enum_Value_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitEnum_Value_Spec(this);
}


std::any PLCSTParser::Enum_Value_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitEnum_Value_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Enum_Value_SpecContext* PLCSTParser::enum_Value_Spec() {
  Enum_Value_SpecContext *_localctx = _tracker.createInstance<Enum_Value_SpecContext>(_ctx, getState());
  enterRule(_localctx, 64, PLCSTParser::RuleEnum_Value_Spec);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(715);
    identifier();
    setState(721);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(716);
      match(PLCSTParser::Assign);
      setState(719);
      _errHandler->sync(this);
      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 32, _ctx)) {
      case 1: {
        setState(717);
        int_Literal();
        break;
      }

      case 2: {
        setState(718);
        constant_Expr();
        break;
      }

      default:
        break;
      }
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Enum_ValueContext ------------------------------------------------------------------

PLCSTParser::Enum_ValueContext::Enum_ValueContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Enum_ValueContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}

PLCSTParser::Enum_Type_NameContext* PLCSTParser::Enum_ValueContext::enum_Type_Name() {
  return getRuleContext<PLCSTParser::Enum_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Enum_ValueContext::TypeSign() {
  return getToken(PLCSTParser::TypeSign, 0);
}


size_t PLCSTParser::Enum_ValueContext::getRuleIndex() const {
  return PLCSTParser::RuleEnum_Value;
}

void PLCSTParser::Enum_ValueContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterEnum_Value(this);
}

void PLCSTParser::Enum_ValueContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitEnum_Value(this);
}


std::any PLCSTParser::Enum_ValueContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitEnum_Value(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Enum_ValueContext* PLCSTParser::enum_Value() {
  Enum_ValueContext *_localctx = _tracker.createInstance<Enum_ValueContext>(_ctx, getState());
  enterRule(_localctx, 66, PLCSTParser::RuleEnum_Value);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(726);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 34, _ctx)) {
    case 1: {
      setState(723);
      enum_Type_Name();
      setState(724);
      match(PLCSTParser::TypeSign);
      break;
    }

    default:
      break;
    }
    setState(728);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Array_Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Array_Type_DeclContext::Array_Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Array_Type_NameContext* PLCSTParser::Array_Type_DeclContext::array_Type_Name() {
  return getRuleContext<PLCSTParser::Array_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Array_Type_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Array_Spec_InitContext* PLCSTParser::Array_Type_DeclContext::array_Spec_Init() {
  return getRuleContext<PLCSTParser::Array_Spec_InitContext>(0);
}


size_t PLCSTParser::Array_Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleArray_Type_Decl;
}

void PLCSTParser::Array_Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArray_Type_Decl(this);
}

void PLCSTParser::Array_Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArray_Type_Decl(this);
}


std::any PLCSTParser::Array_Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitArray_Type_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Array_Type_DeclContext* PLCSTParser::array_Type_Decl() {
  Array_Type_DeclContext *_localctx = _tracker.createInstance<Array_Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 68, PLCSTParser::RuleArray_Type_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(730);
    array_Type_Name();
    setState(731);
    match(PLCSTParser::Colon);
    setState(732);
    array_Spec_Init();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Array_Spec_InitContext ------------------------------------------------------------------

PLCSTParser::Array_Spec_InitContext::Array_Spec_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Array_SpecContext* PLCSTParser::Array_Spec_InitContext::array_Spec() {
  return getRuleContext<PLCSTParser::Array_SpecContext>(0);
}

tree::TerminalNode* PLCSTParser::Array_Spec_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Array_InitContext* PLCSTParser::Array_Spec_InitContext::array_Init() {
  return getRuleContext<PLCSTParser::Array_InitContext>(0);
}


size_t PLCSTParser::Array_Spec_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleArray_Spec_Init;
}

void PLCSTParser::Array_Spec_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArray_Spec_Init(this);
}

void PLCSTParser::Array_Spec_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArray_Spec_Init(this);
}


std::any PLCSTParser::Array_Spec_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitArray_Spec_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Array_Spec_InitContext* PLCSTParser::array_Spec_Init() {
  Array_Spec_InitContext *_localctx = _tracker.createInstance<Array_Spec_InitContext>(_ctx, getState());
  enterRule(_localctx, 70, PLCSTParser::RuleArray_Spec_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(734);
    array_Spec();
    setState(737);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(735);
      match(PLCSTParser::Assign);
      setState(736);
      array_Init();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Array_SpecContext ------------------------------------------------------------------

PLCSTParser::Array_SpecContext::Array_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Nested_Array_Type_NameContext* PLCSTParser::Array_SpecContext::nested_Array_Type_Name() {
  return getRuleContext<PLCSTParser::Nested_Array_Type_NameContext>(0);
}

PLCSTParser::Direct_Array_Type_NameContext* PLCSTParser::Array_SpecContext::direct_Array_Type_Name() {
  return getRuleContext<PLCSTParser::Direct_Array_Type_NameContext>(0);
}


size_t PLCSTParser::Array_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleArray_Spec;
}

void PLCSTParser::Array_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArray_Spec(this);
}

void PLCSTParser::Array_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArray_Spec(this);
}


std::any PLCSTParser::Array_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitArray_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Array_SpecContext* PLCSTParser::array_Spec() {
  Array_SpecContext *_localctx = _tracker.createInstance<Array_SpecContext>(_ctx, getState());
  enterRule(_localctx, 72, PLCSTParser::RuleArray_Spec);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(741);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        enterOuterAlt(_localctx, 1);
        setState(739);
        nested_Array_Type_Name();
        break;
      }

      case PLCSTParser::ARRAY: {
        enterOuterAlt(_localctx, 2);
        setState(740);
        direct_Array_Type_Name();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Nested_Array_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Nested_Array_Type_NameContext::Nested_Array_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Array_Type_NameContext* PLCSTParser::Nested_Array_Type_NameContext::array_Type_Name() {
  return getRuleContext<PLCSTParser::Array_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Nested_Array_Type_NameContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Nested_Array_Type_NameContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Nested_Array_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleNested_Array_Type_Name;
}

void PLCSTParser::Nested_Array_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNested_Array_Type_Name(this);
}

void PLCSTParser::Nested_Array_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNested_Array_Type_Name(this);
}


std::any PLCSTParser::Nested_Array_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNested_Array_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Nested_Array_Type_NameContext* PLCSTParser::nested_Array_Type_Name() {
  Nested_Array_Type_NameContext *_localctx = _tracker.createInstance<Nested_Array_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 74, PLCSTParser::RuleNested_Array_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(746);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 37, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(743);
        nestedNameSpecifier(); 
      }
      setState(748);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 37, _ctx);
    }
    setState(749);
    array_Type_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Direct_Array_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Direct_Array_Type_NameContext::Direct_Array_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Direct_Array_Type_NameContext::ARRAY() {
  return getToken(PLCSTParser::ARRAY, 0);
}

tree::TerminalNode* PLCSTParser::Direct_Array_Type_NameContext::LeftBracket() {
  return getToken(PLCSTParser::LeftBracket, 0);
}

std::vector<PLCSTParser::SubrangeContext *> PLCSTParser::Direct_Array_Type_NameContext::subrange() {
  return getRuleContexts<PLCSTParser::SubrangeContext>();
}

PLCSTParser::SubrangeContext* PLCSTParser::Direct_Array_Type_NameContext::subrange(size_t i) {
  return getRuleContext<PLCSTParser::SubrangeContext>(i);
}

tree::TerminalNode* PLCSTParser::Direct_Array_Type_NameContext::RightBracket() {
  return getToken(PLCSTParser::RightBracket, 0);
}

tree::TerminalNode* PLCSTParser::Direct_Array_Type_NameContext::OF() {
  return getToken(PLCSTParser::OF, 0);
}

PLCSTParser::Data_Type_AccessContext* PLCSTParser::Direct_Array_Type_NameContext::data_Type_Access() {
  return getRuleContext<PLCSTParser::Data_Type_AccessContext>(0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Direct_Array_Type_NameContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Direct_Array_Type_NameContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Direct_Array_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleDirect_Array_Type_Name;
}

void PLCSTParser::Direct_Array_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDirect_Array_Type_Name(this);
}

void PLCSTParser::Direct_Array_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDirect_Array_Type_Name(this);
}


std::any PLCSTParser::Direct_Array_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitDirect_Array_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Direct_Array_Type_NameContext* PLCSTParser::direct_Array_Type_Name() {
  Direct_Array_Type_NameContext *_localctx = _tracker.createInstance<Direct_Array_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 76, PLCSTParser::RuleDirect_Array_Type_Name);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(751);
    match(PLCSTParser::ARRAY);
    setState(752);
    match(PLCSTParser::LeftBracket);
    setState(753);
    subrange();
    setState(758);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(754);
      match(PLCSTParser::Comma);
      setState(755);
      subrange();
      setState(760);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(761);
    match(PLCSTParser::RightBracket);
    setState(762);
    match(PLCSTParser::OF);
    setState(763);
    data_Type_Access();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Array_InitContext ------------------------------------------------------------------

PLCSTParser::Array_InitContext::Array_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Array_InitContext::LeftBracket() {
  return getToken(PLCSTParser::LeftBracket, 0);
}

std::vector<PLCSTParser::Array_Elem_InitContext *> PLCSTParser::Array_InitContext::array_Elem_Init() {
  return getRuleContexts<PLCSTParser::Array_Elem_InitContext>();
}

PLCSTParser::Array_Elem_InitContext* PLCSTParser::Array_InitContext::array_Elem_Init(size_t i) {
  return getRuleContext<PLCSTParser::Array_Elem_InitContext>(i);
}

tree::TerminalNode* PLCSTParser::Array_InitContext::RightBracket() {
  return getToken(PLCSTParser::RightBracket, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Array_InitContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Array_InitContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Array_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleArray_Init;
}

void PLCSTParser::Array_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArray_Init(this);
}

void PLCSTParser::Array_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArray_Init(this);
}


std::any PLCSTParser::Array_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitArray_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Array_InitContext* PLCSTParser::array_Init() {
  Array_InitContext *_localctx = _tracker.createInstance<Array_InitContext>(_ctx, getState());
  enterRule(_localctx, 78, PLCSTParser::RuleArray_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(765);
    match(PLCSTParser::LeftBracket);
    setState(766);
    array_Elem_Init();
    setState(771);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(767);
      match(PLCSTParser::Comma);
      setState(768);
      array_Elem_Init();
      setState(773);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(774);
    match(PLCSTParser::RightBracket);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Array_Elem_InitContext ------------------------------------------------------------------

PLCSTParser::Array_Elem_InitContext::Array_Elem_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Array_Elem_Init_ValueContext* PLCSTParser::Array_Elem_InitContext::array_Elem_Init_Value() {
  return getRuleContext<PLCSTParser::Array_Elem_Init_ValueContext>(0);
}

PLCSTParser::Mult_Array_Elem_Init_ValueContext* PLCSTParser::Array_Elem_InitContext::mult_Array_Elem_Init_Value() {
  return getRuleContext<PLCSTParser::Mult_Array_Elem_Init_ValueContext>(0);
}


size_t PLCSTParser::Array_Elem_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleArray_Elem_Init;
}

void PLCSTParser::Array_Elem_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArray_Elem_Init(this);
}

void PLCSTParser::Array_Elem_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArray_Elem_Init(this);
}


std::any PLCSTParser::Array_Elem_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitArray_Elem_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Array_Elem_InitContext* PLCSTParser::array_Elem_Init() {
  Array_Elem_InitContext *_localctx = _tracker.createInstance<Array_Elem_InitContext>(_ctx, getState());
  enterRule(_localctx, 80, PLCSTParser::RuleArray_Elem_Init);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(778);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 40, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(776);
      array_Elem_Init_Value();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(777);
      mult_Array_Elem_Init_Value();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Mult_Array_Elem_Init_ValueContext ------------------------------------------------------------------

PLCSTParser::Mult_Array_Elem_Init_ValueContext::Mult_Array_Elem_Init_ValueContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Mult_Array_Elem_Init_ValueContext::Unsigned_Int() {
  return getToken(PLCSTParser::Unsigned_Int, 0);
}

tree::TerminalNode* PLCSTParser::Mult_Array_Elem_Init_ValueContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

tree::TerminalNode* PLCSTParser::Mult_Array_Elem_Init_ValueContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

PLCSTParser::Array_Elem_Init_ValueContext* PLCSTParser::Mult_Array_Elem_Init_ValueContext::array_Elem_Init_Value() {
  return getRuleContext<PLCSTParser::Array_Elem_Init_ValueContext>(0);
}


size_t PLCSTParser::Mult_Array_Elem_Init_ValueContext::getRuleIndex() const {
  return PLCSTParser::RuleMult_Array_Elem_Init_Value;
}

void PLCSTParser::Mult_Array_Elem_Init_ValueContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMult_Array_Elem_Init_Value(this);
}

void PLCSTParser::Mult_Array_Elem_Init_ValueContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMult_Array_Elem_Init_Value(this);
}


std::any PLCSTParser::Mult_Array_Elem_Init_ValueContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitMult_Array_Elem_Init_Value(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Mult_Array_Elem_Init_ValueContext* PLCSTParser::mult_Array_Elem_Init_Value() {
  Mult_Array_Elem_Init_ValueContext *_localctx = _tracker.createInstance<Mult_Array_Elem_Init_ValueContext>(_ctx, getState());
  enterRule(_localctx, 82, PLCSTParser::RuleMult_Array_Elem_Init_Value);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(780);
    match(PLCSTParser::Unsigned_Int);
    setState(781);
    match(PLCSTParser::LeftParen);
    setState(783);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 4082215571425278) != 0 || (((_la - 66) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 66)) & 72057595648540683) != 0 || (((_la - 145) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 145)) & 201392641) != 0) {
      setState(782);
      array_Elem_Init_Value();
    }
    setState(785);
    match(PLCSTParser::RightParen);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Array_Elem_Init_ValueContext ------------------------------------------------------------------

PLCSTParser::Array_Elem_Init_ValueContext::Array_Elem_Init_ValueContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Constant_ExprContext* PLCSTParser::Array_Elem_Init_ValueContext::constant_Expr() {
  return getRuleContext<PLCSTParser::Constant_ExprContext>(0);
}

PLCSTParser::Enum_ValueContext* PLCSTParser::Array_Elem_Init_ValueContext::enum_Value() {
  return getRuleContext<PLCSTParser::Enum_ValueContext>(0);
}

PLCSTParser::Struct_InitContext* PLCSTParser::Array_Elem_Init_ValueContext::struct_Init() {
  return getRuleContext<PLCSTParser::Struct_InitContext>(0);
}

PLCSTParser::Array_InitContext* PLCSTParser::Array_Elem_Init_ValueContext::array_Init() {
  return getRuleContext<PLCSTParser::Array_InitContext>(0);
}


size_t PLCSTParser::Array_Elem_Init_ValueContext::getRuleIndex() const {
  return PLCSTParser::RuleArray_Elem_Init_Value;
}

void PLCSTParser::Array_Elem_Init_ValueContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArray_Elem_Init_Value(this);
}

void PLCSTParser::Array_Elem_Init_ValueContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArray_Elem_Init_Value(this);
}


std::any PLCSTParser::Array_Elem_Init_ValueContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitArray_Elem_Init_Value(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Array_Elem_Init_ValueContext* PLCSTParser::array_Elem_Init_Value() {
  Array_Elem_Init_ValueContext *_localctx = _tracker.createInstance<Array_Elem_Init_ValueContext>(_ctx, getState());
  enterRule(_localctx, 84, PLCSTParser::RuleArray_Elem_Init_Value);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(791);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 42, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(787);
      constant_Expr();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(788);
      enum_Value();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(789);
      struct_Init();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(790);
      array_Init();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Struct_Type_DeclContext::Struct_Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Struct_Type_NameContext* PLCSTParser::Struct_Type_DeclContext::struct_Type_Name() {
  return getRuleContext<PLCSTParser::Struct_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Struct_Type_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Struct_SpecContext* PLCSTParser::Struct_Type_DeclContext::struct_Spec() {
  return getRuleContext<PLCSTParser::Struct_SpecContext>(0);
}


size_t PLCSTParser::Struct_Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Type_Decl;
}

void PLCSTParser::Struct_Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Type_Decl(this);
}

void PLCSTParser::Struct_Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Type_Decl(this);
}


std::any PLCSTParser::Struct_Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Type_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_Type_DeclContext* PLCSTParser::struct_Type_Decl() {
  Struct_Type_DeclContext *_localctx = _tracker.createInstance<Struct_Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 86, PLCSTParser::RuleStruct_Type_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(793);
    struct_Type_Name();
    setState(794);
    match(PLCSTParser::Colon);
    setState(795);
    struct_Spec();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Nested_Struct_Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Nested_Struct_Type_DeclContext::Nested_Struct_Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Struct_Type_NameContext* PLCSTParser::Nested_Struct_Type_DeclContext::struct_Type_Name() {
  return getRuleContext<PLCSTParser::Struct_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Nested_Struct_Type_DeclContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Nested_Struct_Type_DeclContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Nested_Struct_Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleNested_Struct_Type_Decl;
}

void PLCSTParser::Nested_Struct_Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNested_Struct_Type_Decl(this);
}

void PLCSTParser::Nested_Struct_Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNested_Struct_Type_Decl(this);
}


std::any PLCSTParser::Nested_Struct_Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNested_Struct_Type_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Nested_Struct_Type_DeclContext* PLCSTParser::nested_Struct_Type_Decl() {
  Nested_Struct_Type_DeclContext *_localctx = _tracker.createInstance<Nested_Struct_Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 88, PLCSTParser::RuleNested_Struct_Type_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(800);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 43, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(797);
        nestedNameSpecifier(); 
      }
      setState(802);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 43, _ctx);
    }
    setState(803);
    struct_Type_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_SpecContext ------------------------------------------------------------------

PLCSTParser::Struct_SpecContext::Struct_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Struct_DeclContext* PLCSTParser::Struct_SpecContext::struct_Decl() {
  return getRuleContext<PLCSTParser::Struct_DeclContext>(0);
}

PLCSTParser::Struct_Spec_InitContext* PLCSTParser::Struct_SpecContext::struct_Spec_Init() {
  return getRuleContext<PLCSTParser::Struct_Spec_InitContext>(0);
}


size_t PLCSTParser::Struct_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Spec;
}

void PLCSTParser::Struct_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Spec(this);
}

void PLCSTParser::Struct_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Spec(this);
}


std::any PLCSTParser::Struct_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_SpecContext* PLCSTParser::struct_Spec() {
  Struct_SpecContext *_localctx = _tracker.createInstance<Struct_SpecContext>(_ctx, getState());
  enterRule(_localctx, 90, PLCSTParser::RuleStruct_Spec);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(807);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::STRUCT: {
        enterOuterAlt(_localctx, 1);
        setState(805);
        struct_Decl();
        break;
      }

      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        enterOuterAlt(_localctx, 2);
        setState(806);
        struct_Spec_Init();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_Spec_InitContext ------------------------------------------------------------------

PLCSTParser::Struct_Spec_InitContext::Struct_Spec_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Nested_Struct_Type_DeclContext* PLCSTParser::Struct_Spec_InitContext::nested_Struct_Type_Decl() {
  return getRuleContext<PLCSTParser::Nested_Struct_Type_DeclContext>(0);
}

tree::TerminalNode* PLCSTParser::Struct_Spec_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Struct_InitContext* PLCSTParser::Struct_Spec_InitContext::struct_Init() {
  return getRuleContext<PLCSTParser::Struct_InitContext>(0);
}


size_t PLCSTParser::Struct_Spec_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Spec_Init;
}

void PLCSTParser::Struct_Spec_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Spec_Init(this);
}

void PLCSTParser::Struct_Spec_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Spec_Init(this);
}


std::any PLCSTParser::Struct_Spec_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Spec_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_Spec_InitContext* PLCSTParser::struct_Spec_Init() {
  Struct_Spec_InitContext *_localctx = _tracker.createInstance<Struct_Spec_InitContext>(_ctx, getState());
  enterRule(_localctx, 92, PLCSTParser::RuleStruct_Spec_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(809);
    nested_Struct_Type_Decl();
    setState(812);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(810);
      match(PLCSTParser::Assign);
      setState(811);
      struct_Init();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_DeclContext ------------------------------------------------------------------

PLCSTParser::Struct_DeclContext::Struct_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Struct_DeclContext::STRUCT() {
  return getToken(PLCSTParser::STRUCT, 0);
}

tree::TerminalNode* PLCSTParser::Struct_DeclContext::END_STRUCT() {
  return getToken(PLCSTParser::END_STRUCT, 0);
}

tree::TerminalNode* PLCSTParser::Struct_DeclContext::OVERLAP() {
  return getToken(PLCSTParser::OVERLAP, 0);
}

std::vector<PLCSTParser::Struct_Elem_DeclContext *> PLCSTParser::Struct_DeclContext::struct_Elem_Decl() {
  return getRuleContexts<PLCSTParser::Struct_Elem_DeclContext>();
}

PLCSTParser::Struct_Elem_DeclContext* PLCSTParser::Struct_DeclContext::struct_Elem_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Struct_Elem_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Struct_DeclContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Struct_DeclContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::Struct_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Decl;
}

void PLCSTParser::Struct_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Decl(this);
}

void PLCSTParser::Struct_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Decl(this);
}


std::any PLCSTParser::Struct_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_DeclContext* PLCSTParser::struct_Decl() {
  Struct_DeclContext *_localctx = _tracker.createInstance<Struct_DeclContext>(_ctx, getState());
  enterRule(_localctx, 94, PLCSTParser::RuleStruct_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(814);
    match(PLCSTParser::STRUCT);
    setState(816);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::OVERLAP) {
      setState(815);
      match(PLCSTParser::OVERLAP);
    }
    setState(821); 
    _errHandler->sync(this);
    _la = _input->LA(1);
    do {
      setState(818);
      struct_Elem_Decl();
      setState(819);
      match(PLCSTParser::Semi);
      setState(823); 
      _errHandler->sync(this);
      _la = _input->LA(1);
    } while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0);
    setState(825);
    match(PLCSTParser::END_STRUCT);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_Elem_DeclContext ------------------------------------------------------------------

PLCSTParser::Struct_Elem_DeclContext::Struct_Elem_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Struct_Elem_NameContext* PLCSTParser::Struct_Elem_DeclContext::struct_Elem_Name() {
  return getRuleContext<PLCSTParser::Struct_Elem_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Struct_Elem_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Simple_Spec_InitContext* PLCSTParser::Struct_Elem_DeclContext::simple_Spec_Init() {
  return getRuleContext<PLCSTParser::Simple_Spec_InitContext>(0);
}

PLCSTParser::Subrange_Spec_InitContext* PLCSTParser::Struct_Elem_DeclContext::subrange_Spec_Init() {
  return getRuleContext<PLCSTParser::Subrange_Spec_InitContext>(0);
}

PLCSTParser::Enum_Spec_InitContext* PLCSTParser::Struct_Elem_DeclContext::enum_Spec_Init() {
  return getRuleContext<PLCSTParser::Enum_Spec_InitContext>(0);
}

PLCSTParser::Array_Spec_InitContext* PLCSTParser::Struct_Elem_DeclContext::array_Spec_Init() {
  return getRuleContext<PLCSTParser::Array_Spec_InitContext>(0);
}

PLCSTParser::Struct_Spec_InitContext* PLCSTParser::Struct_Elem_DeclContext::struct_Spec_Init() {
  return getRuleContext<PLCSTParser::Struct_Spec_InitContext>(0);
}

PLCSTParser::Located_AtContext* PLCSTParser::Struct_Elem_DeclContext::located_At() {
  return getRuleContext<PLCSTParser::Located_AtContext>(0);
}

tree::TerminalNode* PLCSTParser::Struct_Elem_DeclContext::Multibit_Part_Access() {
  return getToken(PLCSTParser::Multibit_Part_Access, 0);
}


size_t PLCSTParser::Struct_Elem_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Elem_Decl;
}

void PLCSTParser::Struct_Elem_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Elem_Decl(this);
}

void PLCSTParser::Struct_Elem_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Elem_Decl(this);
}


std::any PLCSTParser::Struct_Elem_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Elem_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_Elem_DeclContext* PLCSTParser::struct_Elem_Decl() {
  Struct_Elem_DeclContext *_localctx = _tracker.createInstance<Struct_Elem_DeclContext>(_ctx, getState());
  enterRule(_localctx, 96, PLCSTParser::RuleStruct_Elem_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(827);
    struct_Elem_Name();
    setState(832);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::AT) {
      setState(828);
      located_At();
      setState(830);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == PLCSTParser::Multibit_Part_Access) {
        setState(829);
        match(PLCSTParser::Multibit_Part_Access);
      }
    }
    setState(834);
    match(PLCSTParser::Colon);
    setState(840);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 50, _ctx)) {
    case 1: {
      setState(835);
      simple_Spec_Init();
      break;
    }

    case 2: {
      setState(836);
      subrange_Spec_Init();
      break;
    }

    case 3: {
      setState(837);
      enum_Spec_Init();
      break;
    }

    case 4: {
      setState(838);
      array_Spec_Init();
      break;
    }

    case 5: {
      setState(839);
      struct_Spec_Init();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_InitContext ------------------------------------------------------------------

PLCSTParser::Struct_InitContext::Struct_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Struct_InitContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

std::vector<PLCSTParser::Struct_Elem_InitContext *> PLCSTParser::Struct_InitContext::struct_Elem_Init() {
  return getRuleContexts<PLCSTParser::Struct_Elem_InitContext>();
}

PLCSTParser::Struct_Elem_InitContext* PLCSTParser::Struct_InitContext::struct_Elem_Init(size_t i) {
  return getRuleContext<PLCSTParser::Struct_Elem_InitContext>(i);
}

tree::TerminalNode* PLCSTParser::Struct_InitContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Struct_InitContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Struct_InitContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Struct_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Init;
}

void PLCSTParser::Struct_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Init(this);
}

void PLCSTParser::Struct_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Init(this);
}


std::any PLCSTParser::Struct_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_InitContext* PLCSTParser::struct_Init() {
  Struct_InitContext *_localctx = _tracker.createInstance<Struct_InitContext>(_ctx, getState());
  enterRule(_localctx, 98, PLCSTParser::RuleStruct_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(842);
    match(PLCSTParser::LeftParen);
    setState(843);
    struct_Elem_Init();
    setState(848);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(844);
      match(PLCSTParser::Comma);
      setState(845);
      struct_Elem_Init();
      setState(850);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(851);
    match(PLCSTParser::RightParen);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_Elem_InitContext ------------------------------------------------------------------

PLCSTParser::Struct_Elem_InitContext::Struct_Elem_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Struct_Elem_NameContext* PLCSTParser::Struct_Elem_InitContext::struct_Elem_Name() {
  return getRuleContext<PLCSTParser::Struct_Elem_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Struct_Elem_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Constant_ExprContext* PLCSTParser::Struct_Elem_InitContext::constant_Expr() {
  return getRuleContext<PLCSTParser::Constant_ExprContext>(0);
}

PLCSTParser::Enum_ValueContext* PLCSTParser::Struct_Elem_InitContext::enum_Value() {
  return getRuleContext<PLCSTParser::Enum_ValueContext>(0);
}

PLCSTParser::Array_InitContext* PLCSTParser::Struct_Elem_InitContext::array_Init() {
  return getRuleContext<PLCSTParser::Array_InitContext>(0);
}

PLCSTParser::Struct_InitContext* PLCSTParser::Struct_Elem_InitContext::struct_Init() {
  return getRuleContext<PLCSTParser::Struct_InitContext>(0);
}

PLCSTParser::Ref_ValueContext* PLCSTParser::Struct_Elem_InitContext::ref_Value() {
  return getRuleContext<PLCSTParser::Ref_ValueContext>(0);
}


size_t PLCSTParser::Struct_Elem_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Elem_Init;
}

void PLCSTParser::Struct_Elem_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Elem_Init(this);
}

void PLCSTParser::Struct_Elem_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Elem_Init(this);
}


std::any PLCSTParser::Struct_Elem_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Elem_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_Elem_InitContext* PLCSTParser::struct_Elem_Init() {
  Struct_Elem_InitContext *_localctx = _tracker.createInstance<Struct_Elem_InitContext>(_ctx, getState());
  enterRule(_localctx, 100, PLCSTParser::RuleStruct_Elem_Init);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(853);
    struct_Elem_Name();
    setState(854);
    match(PLCSTParser::Assign);
    setState(860);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 52, _ctx)) {
    case 1: {
      setState(855);
      constant_Expr();
      break;
    }

    case 2: {
      setState(856);
      enum_Value();
      break;
    }

    case 3: {
      setState(857);
      array_Init();
      break;
    }

    case 4: {
      setState(858);
      struct_Init();
      break;
    }

    case 5: {
      setState(859);
      ref_Value();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Str_Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Str_Type_DeclContext::Str_Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::String_Type_NameContext *> PLCSTParser::Str_Type_DeclContext::string_Type_Name() {
  return getRuleContexts<PLCSTParser::String_Type_NameContext>();
}

PLCSTParser::String_Type_NameContext* PLCSTParser::Str_Type_DeclContext::string_Type_Name(size_t i) {
  return getRuleContext<PLCSTParser::String_Type_NameContext>(i);
}

tree::TerminalNode* PLCSTParser::Str_Type_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

tree::TerminalNode* PLCSTParser::Str_Type_DeclContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Char_StrContext* PLCSTParser::Str_Type_DeclContext::char_Str() {
  return getRuleContext<PLCSTParser::Char_StrContext>(0);
}


size_t PLCSTParser::Str_Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleStr_Type_Decl;
}

void PLCSTParser::Str_Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStr_Type_Decl(this);
}

void PLCSTParser::Str_Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStr_Type_Decl(this);
}


std::any PLCSTParser::Str_Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStr_Type_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Str_Type_DeclContext* PLCSTParser::str_Type_Decl() {
  Str_Type_DeclContext *_localctx = _tracker.createInstance<Str_Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 102, PLCSTParser::RuleStr_Type_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(862);
    string_Type_Name();
    setState(863);
    match(PLCSTParser::Colon);
    setState(864);
    string_Type_Name();
    setState(867);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(865);
      match(PLCSTParser::Assign);
      setState(866);
      char_Str();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_Type_DeclContext ------------------------------------------------------------------

PLCSTParser::Ref_Type_DeclContext::Ref_Type_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Ref_Type_NameContext* PLCSTParser::Ref_Type_DeclContext::ref_Type_Name() {
  return getRuleContext<PLCSTParser::Ref_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Ref_Type_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Ref_Spec_InitContext* PLCSTParser::Ref_Type_DeclContext::ref_Spec_Init() {
  return getRuleContext<PLCSTParser::Ref_Spec_InitContext>(0);
}


size_t PLCSTParser::Ref_Type_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Type_Decl;
}

void PLCSTParser::Ref_Type_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Type_Decl(this);
}

void PLCSTParser::Ref_Type_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Type_Decl(this);
}


std::any PLCSTParser::Ref_Type_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Type_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_Type_DeclContext* PLCSTParser::ref_Type_Decl() {
  Ref_Type_DeclContext *_localctx = _tracker.createInstance<Ref_Type_DeclContext>(_ctx, getState());
  enterRule(_localctx, 104, PLCSTParser::RuleRef_Type_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(869);
    ref_Type_Name();
    setState(870);
    match(PLCSTParser::Colon);
    setState(871);
    ref_Spec_Init();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_Spec_InitContext ------------------------------------------------------------------

PLCSTParser::Ref_Spec_InitContext::Ref_Spec_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Ref_SpecContext* PLCSTParser::Ref_Spec_InitContext::ref_Spec() {
  return getRuleContext<PLCSTParser::Ref_SpecContext>(0);
}

tree::TerminalNode* PLCSTParser::Ref_Spec_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Ref_ValueContext* PLCSTParser::Ref_Spec_InitContext::ref_Value() {
  return getRuleContext<PLCSTParser::Ref_ValueContext>(0);
}


size_t PLCSTParser::Ref_Spec_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Spec_Init;
}

void PLCSTParser::Ref_Spec_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Spec_Init(this);
}

void PLCSTParser::Ref_Spec_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Spec_Init(this);
}


std::any PLCSTParser::Ref_Spec_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Spec_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_Spec_InitContext* PLCSTParser::ref_Spec_Init() {
  Ref_Spec_InitContext *_localctx = _tracker.createInstance<Ref_Spec_InitContext>(_ctx, getState());
  enterRule(_localctx, 106, PLCSTParser::RuleRef_Spec_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(873);
    ref_Spec();
    setState(876);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(874);
      match(PLCSTParser::Assign);
      setState(875);
      ref_Value();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_SpecContext ------------------------------------------------------------------

PLCSTParser::Ref_SpecContext::Ref_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Data_Type_AccessContext* PLCSTParser::Ref_SpecContext::data_Type_Access() {
  return getRuleContext<PLCSTParser::Data_Type_AccessContext>(0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Ref_SpecContext::REF_TO() {
  return getTokens(PLCSTParser::REF_TO);
}

tree::TerminalNode* PLCSTParser::Ref_SpecContext::REF_TO(size_t i) {
  return getToken(PLCSTParser::REF_TO, i);
}


size_t PLCSTParser::Ref_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Spec;
}

void PLCSTParser::Ref_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Spec(this);
}

void PLCSTParser::Ref_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Spec(this);
}


std::any PLCSTParser::Ref_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_SpecContext* PLCSTParser::ref_Spec() {
  Ref_SpecContext *_localctx = _tracker.createInstance<Ref_SpecContext>(_ctx, getState());
  enterRule(_localctx, 108, PLCSTParser::RuleRef_Spec);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(879); 
    _errHandler->sync(this);
    _la = _input->LA(1);
    do {
      setState(878);
      match(PLCSTParser::REF_TO);
      setState(881); 
      _errHandler->sync(this);
      _la = _input->LA(1);
    } while (_la == PLCSTParser::REF_TO);
    setState(883);
    data_Type_Access();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_Type_AccessContext ------------------------------------------------------------------

PLCSTParser::Ref_Type_AccessContext::Ref_Type_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Ref_Type_NameContext* PLCSTParser::Ref_Type_AccessContext::ref_Type_Name() {
  return getRuleContext<PLCSTParser::Ref_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Ref_Type_AccessContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Ref_Type_AccessContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Ref_Type_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Type_Access;
}

void PLCSTParser::Ref_Type_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Type_Access(this);
}

void PLCSTParser::Ref_Type_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Type_Access(this);
}


std::any PLCSTParser::Ref_Type_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Type_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_Type_AccessContext* PLCSTParser::ref_Type_Access() {
  Ref_Type_AccessContext *_localctx = _tracker.createInstance<Ref_Type_AccessContext>(_ctx, getState());
  enterRule(_localctx, 110, PLCSTParser::RuleRef_Type_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(888);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 56, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(885);
        nestedNameSpecifier(); 
      }
      setState(890);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 56, _ctx);
    }
    setState(891);
    ref_Type_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_ValueContext ------------------------------------------------------------------

PLCSTParser::Ref_ValueContext::Ref_ValueContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Ref_AddrContext* PLCSTParser::Ref_ValueContext::ref_Addr() {
  return getRuleContext<PLCSTParser::Ref_AddrContext>(0);
}

tree::TerminalNode* PLCSTParser::Ref_ValueContext::Null() {
  return getToken(PLCSTParser::Null, 0);
}


size_t PLCSTParser::Ref_ValueContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Value;
}

void PLCSTParser::Ref_ValueContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Value(this);
}

void PLCSTParser::Ref_ValueContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Value(this);
}


std::any PLCSTParser::Ref_ValueContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Value(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_ValueContext* PLCSTParser::ref_Value() {
  Ref_ValueContext *_localctx = _tracker.createInstance<Ref_ValueContext>(_ctx, getState());
  enterRule(_localctx, 112, PLCSTParser::RuleRef_Value);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(895);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::REF: {
        enterOuterAlt(_localctx, 1);
        setState(893);
        ref_Addr();
        break;
      }

      case PLCSTParser::Null: {
        enterOuterAlt(_localctx, 2);
        setState(894);
        match(PLCSTParser::Null);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_AddrContext ------------------------------------------------------------------

PLCSTParser::Ref_AddrContext::Ref_AddrContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Ref_AddrContext::REF() {
  return getToken(PLCSTParser::REF, 0);
}

tree::TerminalNode* PLCSTParser::Ref_AddrContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

tree::TerminalNode* PLCSTParser::Ref_AddrContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

PLCSTParser::Symbolic_VariableContext* PLCSTParser::Ref_AddrContext::symbolic_Variable() {
  return getRuleContext<PLCSTParser::Symbolic_VariableContext>(0);
}

PLCSTParser::FB_Instance_NameContext* PLCSTParser::Ref_AddrContext::fB_Instance_Name() {
  return getRuleContext<PLCSTParser::FB_Instance_NameContext>(0);
}

PLCSTParser::Class_Instance_NameContext* PLCSTParser::Ref_AddrContext::class_Instance_Name() {
  return getRuleContext<PLCSTParser::Class_Instance_NameContext>(0);
}


size_t PLCSTParser::Ref_AddrContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Addr;
}

void PLCSTParser::Ref_AddrContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Addr(this);
}

void PLCSTParser::Ref_AddrContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Addr(this);
}


std::any PLCSTParser::Ref_AddrContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Addr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_AddrContext* PLCSTParser::ref_Addr() {
  Ref_AddrContext *_localctx = _tracker.createInstance<Ref_AddrContext>(_ctx, getState());
  enterRule(_localctx, 114, PLCSTParser::RuleRef_Addr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(897);
    match(PLCSTParser::REF);
    setState(898);
    match(PLCSTParser::LeftParen);
    setState(902);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 58, _ctx)) {
    case 1: {
      setState(899);
      symbolic_Variable();
      break;
    }

    case 2: {
      setState(900);
      fB_Instance_Name();
      break;
    }

    case 3: {
      setState(901);
      class_Instance_Name();
      break;
    }

    default:
      break;
    }
    setState(904);
    match(PLCSTParser::RightParen);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_AssignContext ------------------------------------------------------------------

PLCSTParser::Ref_AssignContext::Ref_AssignContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Ref_NameContext *> PLCSTParser::Ref_AssignContext::ref_Name() {
  return getRuleContexts<PLCSTParser::Ref_NameContext>();
}

PLCSTParser::Ref_NameContext* PLCSTParser::Ref_AssignContext::ref_Name(size_t i) {
  return getRuleContext<PLCSTParser::Ref_NameContext>(i);
}

tree::TerminalNode* PLCSTParser::Ref_AssignContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Ref_DerefContext* PLCSTParser::Ref_AssignContext::ref_Deref() {
  return getRuleContext<PLCSTParser::Ref_DerefContext>(0);
}

PLCSTParser::Ref_ValueContext* PLCSTParser::Ref_AssignContext::ref_Value() {
  return getRuleContext<PLCSTParser::Ref_ValueContext>(0);
}


size_t PLCSTParser::Ref_AssignContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Assign;
}

void PLCSTParser::Ref_AssignContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Assign(this);
}

void PLCSTParser::Ref_AssignContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Assign(this);
}


std::any PLCSTParser::Ref_AssignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Assign(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_AssignContext* PLCSTParser::ref_Assign() {
  Ref_AssignContext *_localctx = _tracker.createInstance<Ref_AssignContext>(_ctx, getState());
  enterRule(_localctx, 116, PLCSTParser::RuleRef_Assign);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(906);
    ref_Name();
    setState(907);
    match(PLCSTParser::Assign);
    setState(911);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 59, _ctx)) {
    case 1: {
      setState(908);
      ref_Name();
      break;
    }

    case 2: {
      setState(909);
      ref_Deref();
      break;
    }

    case 3: {
      setState(910);
      ref_Value();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_DerefContext ------------------------------------------------------------------

PLCSTParser::Ref_DerefContext::Ref_DerefContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Ref_NameContext* PLCSTParser::Ref_DerefContext::ref_Name() {
  return getRuleContext<PLCSTParser::Ref_NameContext>(0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Ref_DerefContext::Caret() {
  return getTokens(PLCSTParser::Caret);
}

tree::TerminalNode* PLCSTParser::Ref_DerefContext::Caret(size_t i) {
  return getToken(PLCSTParser::Caret, i);
}


size_t PLCSTParser::Ref_DerefContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Deref;
}

void PLCSTParser::Ref_DerefContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Deref(this);
}

void PLCSTParser::Ref_DerefContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Deref(this);
}


std::any PLCSTParser::Ref_DerefContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Deref(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_DerefContext* PLCSTParser::ref_Deref() {
  Ref_DerefContext *_localctx = _tracker.createInstance<Ref_DerefContext>(_ctx, getState());
  enterRule(_localctx, 118, PLCSTParser::RuleRef_Deref);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(913);
    ref_Name();
    setState(915); 
    _errHandler->sync(this);
    _la = _input->LA(1);
    do {
      setState(914);
      match(PLCSTParser::Caret);
      setState(917); 
      _errHandler->sync(this);
      _la = _input->LA(1);
    } while (_la == PLCSTParser::Caret);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- VariableContext ------------------------------------------------------------------

PLCSTParser::VariableContext::VariableContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::VariableContext::Direct_Variable() {
  return getToken(PLCSTParser::Direct_Variable, 0);
}

PLCSTParser::Symbolic_VariableContext* PLCSTParser::VariableContext::symbolic_Variable() {
  return getRuleContext<PLCSTParser::Symbolic_VariableContext>(0);
}


size_t PLCSTParser::VariableContext::getRuleIndex() const {
  return PLCSTParser::RuleVariable;
}

void PLCSTParser::VariableContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVariable(this);
}

void PLCSTParser::VariableContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVariable(this);
}


std::any PLCSTParser::VariableContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitVariable(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::VariableContext* PLCSTParser::variable() {
  VariableContext *_localctx = _tracker.createInstance<VariableContext>(_ctx, getState());
  enterRule(_localctx, 120, PLCSTParser::RuleVariable);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(921);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::Direct_Variable: {
        enterOuterAlt(_localctx, 1);
        setState(919);
        match(PLCSTParser::Direct_Variable);
        break;
      }

      case PLCSTParser::THIS:
      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        enterOuterAlt(_localctx, 2);
        setState(920);
        symbolic_Variable();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Symbolic_VariableContext ------------------------------------------------------------------

PLCSTParser::Symbolic_VariableContext::Symbolic_VariableContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Var_AccessContext* PLCSTParser::Symbolic_VariableContext::var_Access() {
  return getRuleContext<PLCSTParser::Var_AccessContext>(0);
}

PLCSTParser::Multi_Elem_VarContext* PLCSTParser::Symbolic_VariableContext::multi_Elem_Var() {
  return getRuleContext<PLCSTParser::Multi_Elem_VarContext>(0);
}

tree::TerminalNode* PLCSTParser::Symbolic_VariableContext::THIS() {
  return getToken(PLCSTParser::THIS, 0);
}

tree::TerminalNode* PLCSTParser::Symbolic_VariableContext::Dot() {
  return getToken(PLCSTParser::Dot, 0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Symbolic_VariableContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Symbolic_VariableContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Symbolic_VariableContext::getRuleIndex() const {
  return PLCSTParser::RuleSymbolic_Variable;
}

void PLCSTParser::Symbolic_VariableContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSymbolic_Variable(this);
}

void PLCSTParser::Symbolic_VariableContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSymbolic_Variable(this);
}


std::any PLCSTParser::Symbolic_VariableContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSymbolic_Variable(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Symbolic_VariableContext* PLCSTParser::symbolic_Variable() {
  Symbolic_VariableContext *_localctx = _tracker.createInstance<Symbolic_VariableContext>(_ctx, getState());
  enterRule(_localctx, 122, PLCSTParser::RuleSymbolic_Variable);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(930);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 63, _ctx)) {
    case 1: {
      setState(923);
      match(PLCSTParser::THIS);
      setState(924);
      match(PLCSTParser::Dot);
      break;
    }

    case 2: {
      setState(926); 
      _errHandler->sync(this);
      alt = 1;
      do {
        switch (alt) {
          case 1: {
                setState(925);
                nestedNameSpecifier();
                break;
              }

        default:
          throw NoViableAltException(this);
        }
        setState(928); 
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 62, _ctx);
      } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER);
      break;
    }

    default:
      break;
    }
    setState(934);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 64, _ctx)) {
    case 1: {
      setState(932);
      var_Access();
      break;
    }

    case 2: {
      setState(933);
      multi_Elem_Var();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Var_AccessContext ------------------------------------------------------------------

PLCSTParser::Var_AccessContext::Var_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_NameContext* PLCSTParser::Var_AccessContext::variable_Name() {
  return getRuleContext<PLCSTParser::Variable_NameContext>(0);
}

PLCSTParser::Ref_DerefContext* PLCSTParser::Var_AccessContext::ref_Deref() {
  return getRuleContext<PLCSTParser::Ref_DerefContext>(0);
}


size_t PLCSTParser::Var_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleVar_Access;
}

void PLCSTParser::Var_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVar_Access(this);
}

void PLCSTParser::Var_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVar_Access(this);
}


std::any PLCSTParser::Var_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitVar_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Var_AccessContext* PLCSTParser::var_Access() {
  Var_AccessContext *_localctx = _tracker.createInstance<Var_AccessContext>(_ctx, getState());
  enterRule(_localctx, 124, PLCSTParser::RuleVar_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(938);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 65, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(936);
      variable_Name();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(937);
      ref_Deref();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Multi_Elem_VarContext ------------------------------------------------------------------

PLCSTParser::Multi_Elem_VarContext::Multi_Elem_VarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Var_AccessContext* PLCSTParser::Multi_Elem_VarContext::var_Access() {
  return getRuleContext<PLCSTParser::Var_AccessContext>(0);
}

std::vector<PLCSTParser::Subscript_ListContext *> PLCSTParser::Multi_Elem_VarContext::subscript_List() {
  return getRuleContexts<PLCSTParser::Subscript_ListContext>();
}

PLCSTParser::Subscript_ListContext* PLCSTParser::Multi_Elem_VarContext::subscript_List(size_t i) {
  return getRuleContext<PLCSTParser::Subscript_ListContext>(i);
}

std::vector<PLCSTParser::Struct_VariableContext *> PLCSTParser::Multi_Elem_VarContext::struct_Variable() {
  return getRuleContexts<PLCSTParser::Struct_VariableContext>();
}

PLCSTParser::Struct_VariableContext* PLCSTParser::Multi_Elem_VarContext::struct_Variable(size_t i) {
  return getRuleContext<PLCSTParser::Struct_VariableContext>(i);
}


size_t PLCSTParser::Multi_Elem_VarContext::getRuleIndex() const {
  return PLCSTParser::RuleMulti_Elem_Var;
}

void PLCSTParser::Multi_Elem_VarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMulti_Elem_Var(this);
}

void PLCSTParser::Multi_Elem_VarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMulti_Elem_Var(this);
}


std::any PLCSTParser::Multi_Elem_VarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitMulti_Elem_Var(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Multi_Elem_VarContext* PLCSTParser::multi_Elem_Var() {
  Multi_Elem_VarContext *_localctx = _tracker.createInstance<Multi_Elem_VarContext>(_ctx, getState());
  enterRule(_localctx, 126, PLCSTParser::RuleMulti_Elem_Var);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(940);
    var_Access();
    setState(943); 
    _errHandler->sync(this);
    _la = _input->LA(1);
    do {
      setState(943);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case PLCSTParser::LeftBracket: {
          setState(941);
          subscript_List();
          break;
        }

        case PLCSTParser::Dot: {
          setState(942);
          struct_Variable();
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(945); 
      _errHandler->sync(this);
      _la = _input->LA(1);
    } while (_la == PLCSTParser::Dot

    || _la == PLCSTParser::LeftBracket);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Subscript_ListContext ------------------------------------------------------------------

PLCSTParser::Subscript_ListContext::Subscript_ListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Subscript_ListContext::LeftBracket() {
  return getToken(PLCSTParser::LeftBracket, 0);
}

std::vector<PLCSTParser::SubscriptContext *> PLCSTParser::Subscript_ListContext::subscript() {
  return getRuleContexts<PLCSTParser::SubscriptContext>();
}

PLCSTParser::SubscriptContext* PLCSTParser::Subscript_ListContext::subscript(size_t i) {
  return getRuleContext<PLCSTParser::SubscriptContext>(i);
}

tree::TerminalNode* PLCSTParser::Subscript_ListContext::RightBracket() {
  return getToken(PLCSTParser::RightBracket, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Subscript_ListContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Subscript_ListContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Subscript_ListContext::getRuleIndex() const {
  return PLCSTParser::RuleSubscript_List;
}

void PLCSTParser::Subscript_ListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSubscript_List(this);
}

void PLCSTParser::Subscript_ListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSubscript_List(this);
}


std::any PLCSTParser::Subscript_ListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSubscript_List(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Subscript_ListContext* PLCSTParser::subscript_List() {
  Subscript_ListContext *_localctx = _tracker.createInstance<Subscript_ListContext>(_ctx, getState());
  enterRule(_localctx, 128, PLCSTParser::RuleSubscript_List);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(947);
    match(PLCSTParser::LeftBracket);
    setState(948);
    subscript();
    setState(953);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(949);
      match(PLCSTParser::Comma);
      setState(950);
      subscript();
      setState(955);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(956);
    match(PLCSTParser::RightBracket);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SubscriptContext ------------------------------------------------------------------

PLCSTParser::SubscriptContext::SubscriptContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::ExpressionContext* PLCSTParser::SubscriptContext::expression() {
  return getRuleContext<PLCSTParser::ExpressionContext>(0);
}


size_t PLCSTParser::SubscriptContext::getRuleIndex() const {
  return PLCSTParser::RuleSubscript;
}

void PLCSTParser::SubscriptContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSubscript(this);
}

void PLCSTParser::SubscriptContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSubscript(this);
}


std::any PLCSTParser::SubscriptContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSubscript(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::SubscriptContext* PLCSTParser::subscript() {
  SubscriptContext *_localctx = _tracker.createInstance<SubscriptContext>(_ctx, getState());
  enterRule(_localctx, 130, PLCSTParser::RuleSubscript);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(958);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_VariableContext ------------------------------------------------------------------

PLCSTParser::Struct_VariableContext::Struct_VariableContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Struct_VariableContext::Dot() {
  return getToken(PLCSTParser::Dot, 0);
}

PLCSTParser::Struct_Elem_SelectContext* PLCSTParser::Struct_VariableContext::struct_Elem_Select() {
  return getRuleContext<PLCSTParser::Struct_Elem_SelectContext>(0);
}


size_t PLCSTParser::Struct_VariableContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Variable;
}

void PLCSTParser::Struct_VariableContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Variable(this);
}

void PLCSTParser::Struct_VariableContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Variable(this);
}


std::any PLCSTParser::Struct_VariableContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Variable(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_VariableContext* PLCSTParser::struct_Variable() {
  Struct_VariableContext *_localctx = _tracker.createInstance<Struct_VariableContext>(_ctx, getState());
  enterRule(_localctx, 132, PLCSTParser::RuleStruct_Variable);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(960);
    match(PLCSTParser::Dot);
    setState(961);
    struct_Elem_Select();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_Elem_SelectContext ------------------------------------------------------------------

PLCSTParser::Struct_Elem_SelectContext::Struct_Elem_SelectContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Var_AccessContext* PLCSTParser::Struct_Elem_SelectContext::var_Access() {
  return getRuleContext<PLCSTParser::Var_AccessContext>(0);
}


size_t PLCSTParser::Struct_Elem_SelectContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Elem_Select;
}

void PLCSTParser::Struct_Elem_SelectContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Elem_Select(this);
}

void PLCSTParser::Struct_Elem_SelectContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Elem_Select(this);
}


std::any PLCSTParser::Struct_Elem_SelectContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Elem_Select(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_Elem_SelectContext* PLCSTParser::struct_Elem_Select() {
  Struct_Elem_SelectContext *_localctx = _tracker.createInstance<Struct_Elem_SelectContext>(_ctx, getState());
  enterRule(_localctx, 134, PLCSTParser::RuleStruct_Elem_Select);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(963);
    var_Access();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Input_DeclsContext ------------------------------------------------------------------

PLCSTParser::Input_DeclsContext::Input_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Input_DeclsContext::VAR_INPUT() {
  return getToken(PLCSTParser::VAR_INPUT, 0);
}

tree::TerminalNode* PLCSTParser::Input_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::Input_DeclContext *> PLCSTParser::Input_DeclsContext::input_Decl() {
  return getRuleContexts<PLCSTParser::Input_DeclContext>();
}

PLCSTParser::Input_DeclContext* PLCSTParser::Input_DeclsContext::input_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Input_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Input_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Input_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}

tree::TerminalNode* PLCSTParser::Input_DeclsContext::RETAIN() {
  return getToken(PLCSTParser::RETAIN, 0);
}

tree::TerminalNode* PLCSTParser::Input_DeclsContext::NON_RETAIN() {
  return getToken(PLCSTParser::NON_RETAIN, 0);
}


size_t PLCSTParser::Input_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleInput_Decls;
}

void PLCSTParser::Input_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInput_Decls(this);
}

void PLCSTParser::Input_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInput_Decls(this);
}


std::any PLCSTParser::Input_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInput_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Input_DeclsContext* PLCSTParser::input_Decls() {
  Input_DeclsContext *_localctx = _tracker.createInstance<Input_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 136, PLCSTParser::RuleInput_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(965);
    match(PLCSTParser::VAR_INPUT);
    setState(967);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::RETAIN

    || _la == PLCSTParser::NON_RETAIN) {
      setState(966);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::RETAIN

      || _la == PLCSTParser::NON_RETAIN)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(974);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(969);
      input_Decl();
      setState(970);
      match(PLCSTParser::Semi);
      setState(976);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(977);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Input_DeclContext ------------------------------------------------------------------

PLCSTParser::Input_DeclContext::Input_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Var_Decl_InitContext* PLCSTParser::Input_DeclContext::var_Decl_Init() {
  return getRuleContext<PLCSTParser::Var_Decl_InitContext>(0);
}

PLCSTParser::Edge_DeclContext* PLCSTParser::Input_DeclContext::edge_Decl() {
  return getRuleContext<PLCSTParser::Edge_DeclContext>(0);
}

PLCSTParser::Array_Conform_DeclContext* PLCSTParser::Input_DeclContext::array_Conform_Decl() {
  return getRuleContext<PLCSTParser::Array_Conform_DeclContext>(0);
}


size_t PLCSTParser::Input_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleInput_Decl;
}

void PLCSTParser::Input_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInput_Decl(this);
}

void PLCSTParser::Input_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInput_Decl(this);
}


std::any PLCSTParser::Input_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInput_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Input_DeclContext* PLCSTParser::input_Decl() {
  Input_DeclContext *_localctx = _tracker.createInstance<Input_DeclContext>(_ctx, getState());
  enterRule(_localctx, 138, PLCSTParser::RuleInput_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(982);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 71, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(979);
      var_Decl_Init();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(980);
      edge_Decl();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(981);
      array_Conform_Decl();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Var_Decl_InitContext ------------------------------------------------------------------

PLCSTParser::Var_Decl_InitContext::Var_Decl_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Common_Var_Decl_InitContext* PLCSTParser::Var_Decl_InitContext::common_Var_Decl_Init() {
  return getRuleContext<PLCSTParser::Common_Var_Decl_InitContext>(0);
}

PLCSTParser::Interface_Spec_InitContext* PLCSTParser::Var_Decl_InitContext::interface_Spec_Init() {
  return getRuleContext<PLCSTParser::Interface_Spec_InitContext>(0);
}


size_t PLCSTParser::Var_Decl_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleVar_Decl_Init;
}

void PLCSTParser::Var_Decl_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVar_Decl_Init(this);
}

void PLCSTParser::Var_Decl_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVar_Decl_Init(this);
}


std::any PLCSTParser::Var_Decl_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitVar_Decl_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Var_Decl_InitContext* PLCSTParser::var_Decl_Init() {
  Var_Decl_InitContext *_localctx = _tracker.createInstance<Var_Decl_InitContext>(_ctx, getState());
  enterRule(_localctx, 140, PLCSTParser::RuleVar_Decl_Init);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(986);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 72, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(984);
      common_Var_Decl_Init();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(985);
      interface_Spec_Init();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Common_Var_Decl_InitContext ------------------------------------------------------------------

PLCSTParser::Common_Var_Decl_InitContext::Common_Var_Decl_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::Common_Var_Decl_InitContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Common_Var_Decl_InitContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Simple_Spec_InitContext* PLCSTParser::Common_Var_Decl_InitContext::simple_Spec_Init() {
  return getRuleContext<PLCSTParser::Simple_Spec_InitContext>(0);
}

PLCSTParser::Ref_Spec_InitContext* PLCSTParser::Common_Var_Decl_InitContext::ref_Spec_Init() {
  return getRuleContext<PLCSTParser::Ref_Spec_InitContext>(0);
}

PLCSTParser::Array_Spec_InitContext* PLCSTParser::Common_Var_Decl_InitContext::array_Spec_Init() {
  return getRuleContext<PLCSTParser::Array_Spec_InitContext>(0);
}

PLCSTParser::Struct_Spec_InitContext* PLCSTParser::Common_Var_Decl_InitContext::struct_Spec_Init() {
  return getRuleContext<PLCSTParser::Struct_Spec_InitContext>(0);
}

PLCSTParser::FB_Spec_InitContext* PLCSTParser::Common_Var_Decl_InitContext::fB_Spec_Init() {
  return getRuleContext<PLCSTParser::FB_Spec_InitContext>(0);
}


size_t PLCSTParser::Common_Var_Decl_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleCommon_Var_Decl_Init;
}

void PLCSTParser::Common_Var_Decl_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCommon_Var_Decl_Init(this);
}

void PLCSTParser::Common_Var_Decl_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCommon_Var_Decl_Init(this);
}


std::any PLCSTParser::Common_Var_Decl_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitCommon_Var_Decl_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Common_Var_Decl_InitContext* PLCSTParser::common_Var_Decl_Init() {
  Common_Var_Decl_InitContext *_localctx = _tracker.createInstance<Common_Var_Decl_InitContext>(_ctx, getState());
  enterRule(_localctx, 142, PLCSTParser::RuleCommon_Var_Decl_Init);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(988);
    variable_List();
    setState(989);
    match(PLCSTParser::Colon);
    setState(995);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 73, _ctx)) {
    case 1: {
      setState(990);
      simple_Spec_Init();
      break;
    }

    case 2: {
      setState(991);
      ref_Spec_Init();
      break;
    }

    case 3: {
      setState(992);
      array_Spec_Init();
      break;
    }

    case 4: {
      setState(993);
      struct_Spec_Init();
      break;
    }

    case 5: {
      setState(994);
      fB_Spec_Init();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Edge_DeclContext ------------------------------------------------------------------

PLCSTParser::Edge_DeclContext::Edge_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::Edge_DeclContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Edge_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

tree::TerminalNode* PLCSTParser::Edge_DeclContext::Bool_Type_Name() {
  return getToken(PLCSTParser::Bool_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::Edge_DeclContext::R_EDGE() {
  return getToken(PLCSTParser::R_EDGE, 0);
}

tree::TerminalNode* PLCSTParser::Edge_DeclContext::F_EDGE() {
  return getToken(PLCSTParser::F_EDGE, 0);
}


size_t PLCSTParser::Edge_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleEdge_Decl;
}

void PLCSTParser::Edge_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterEdge_Decl(this);
}

void PLCSTParser::Edge_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitEdge_Decl(this);
}


std::any PLCSTParser::Edge_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitEdge_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Edge_DeclContext* PLCSTParser::edge_Decl() {
  Edge_DeclContext *_localctx = _tracker.createInstance<Edge_DeclContext>(_ctx, getState());
  enterRule(_localctx, 144, PLCSTParser::RuleEdge_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(997);
    variable_List();
    setState(998);
    match(PLCSTParser::Colon);
    setState(999);
    match(PLCSTParser::Bool_Type_Name);
    setState(1000);
    _la = _input->LA(1);
    if (!(_la == PLCSTParser::R_EDGE

    || _la == PLCSTParser::F_EDGE)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::Ref_Var_DeclContext::Ref_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::Ref_Var_DeclContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Ref_Var_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Ref_SpecContext* PLCSTParser::Ref_Var_DeclContext::ref_Spec() {
  return getRuleContext<PLCSTParser::Ref_SpecContext>(0);
}


size_t PLCSTParser::Ref_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Var_Decl;
}

void PLCSTParser::Ref_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Var_Decl(this);
}

void PLCSTParser::Ref_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Var_Decl(this);
}


std::any PLCSTParser::Ref_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_Var_DeclContext* PLCSTParser::ref_Var_Decl() {
  Ref_Var_DeclContext *_localctx = _tracker.createInstance<Ref_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 146, PLCSTParser::RuleRef_Var_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1002);
    variable_List();
    setState(1003);
    match(PLCSTParser::Colon);
    setState(1004);
    ref_Spec();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Interface_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::Interface_Var_DeclContext::Interface_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::Interface_Var_DeclContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Interface_Var_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Interface_Type_AccessContext* PLCSTParser::Interface_Var_DeclContext::interface_Type_Access() {
  return getRuleContext<PLCSTParser::Interface_Type_AccessContext>(0);
}


size_t PLCSTParser::Interface_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleInterface_Var_Decl;
}

void PLCSTParser::Interface_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInterface_Var_Decl(this);
}

void PLCSTParser::Interface_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInterface_Var_Decl(this);
}


std::any PLCSTParser::Interface_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInterface_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Interface_Var_DeclContext* PLCSTParser::interface_Var_Decl() {
  Interface_Var_DeclContext *_localctx = _tracker.createInstance<Interface_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 148, PLCSTParser::RuleInterface_Var_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1006);
    variable_List();
    setState(1007);
    match(PLCSTParser::Colon);
    setState(1008);
    interface_Type_Access();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Variable_ListContext ------------------------------------------------------------------

PLCSTParser::Variable_ListContext::Variable_ListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Variable_NameContext *> PLCSTParser::Variable_ListContext::variable_Name() {
  return getRuleContexts<PLCSTParser::Variable_NameContext>();
}

PLCSTParser::Variable_NameContext* PLCSTParser::Variable_ListContext::variable_Name(size_t i) {
  return getRuleContext<PLCSTParser::Variable_NameContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Variable_ListContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Variable_ListContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Variable_ListContext::getRuleIndex() const {
  return PLCSTParser::RuleVariable_List;
}

void PLCSTParser::Variable_ListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVariable_List(this);
}

void PLCSTParser::Variable_ListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVariable_List(this);
}


std::any PLCSTParser::Variable_ListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitVariable_List(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Variable_ListContext* PLCSTParser::variable_List() {
  Variable_ListContext *_localctx = _tracker.createInstance<Variable_ListContext>(_ctx, getState());
  enterRule(_localctx, 150, PLCSTParser::RuleVariable_List);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1010);
    variable_Name();
    setState(1015);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(1011);
      match(PLCSTParser::Comma);
      setState(1012);
      variable_Name();
      setState(1017);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Array_ConformandContext ------------------------------------------------------------------

PLCSTParser::Array_ConformandContext::Array_ConformandContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Array_ConformandContext::ARRAY() {
  return getToken(PLCSTParser::ARRAY, 0);
}

tree::TerminalNode* PLCSTParser::Array_ConformandContext::LeftBracket() {
  return getToken(PLCSTParser::LeftBracket, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Array_ConformandContext::Star() {
  return getTokens(PLCSTParser::Star);
}

tree::TerminalNode* PLCSTParser::Array_ConformandContext::Star(size_t i) {
  return getToken(PLCSTParser::Star, i);
}

tree::TerminalNode* PLCSTParser::Array_ConformandContext::RightBracket() {
  return getToken(PLCSTParser::RightBracket, 0);
}

tree::TerminalNode* PLCSTParser::Array_ConformandContext::OF() {
  return getToken(PLCSTParser::OF, 0);
}

PLCSTParser::Data_Type_AccessContext* PLCSTParser::Array_ConformandContext::data_Type_Access() {
  return getRuleContext<PLCSTParser::Data_Type_AccessContext>(0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Array_ConformandContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Array_ConformandContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Array_ConformandContext::getRuleIndex() const {
  return PLCSTParser::RuleArray_Conformand;
}

void PLCSTParser::Array_ConformandContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArray_Conformand(this);
}

void PLCSTParser::Array_ConformandContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArray_Conformand(this);
}


std::any PLCSTParser::Array_ConformandContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitArray_Conformand(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Array_ConformandContext* PLCSTParser::array_Conformand() {
  Array_ConformandContext *_localctx = _tracker.createInstance<Array_ConformandContext>(_ctx, getState());
  enterRule(_localctx, 152, PLCSTParser::RuleArray_Conformand);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1018);
    match(PLCSTParser::ARRAY);
    setState(1019);
    match(PLCSTParser::LeftBracket);
    setState(1020);
    match(PLCSTParser::Star);
    setState(1025);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(1021);
      match(PLCSTParser::Comma);
      setState(1022);
      match(PLCSTParser::Star);
      setState(1027);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1028);
    match(PLCSTParser::RightBracket);
    setState(1029);
    match(PLCSTParser::OF);
    setState(1030);
    data_Type_Access();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Array_Conform_DeclContext ------------------------------------------------------------------

PLCSTParser::Array_Conform_DeclContext::Array_Conform_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::Array_Conform_DeclContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Array_Conform_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Array_ConformandContext* PLCSTParser::Array_Conform_DeclContext::array_Conformand() {
  return getRuleContext<PLCSTParser::Array_ConformandContext>(0);
}


size_t PLCSTParser::Array_Conform_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleArray_Conform_Decl;
}

void PLCSTParser::Array_Conform_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArray_Conform_Decl(this);
}

void PLCSTParser::Array_Conform_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArray_Conform_Decl(this);
}


std::any PLCSTParser::Array_Conform_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitArray_Conform_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Array_Conform_DeclContext* PLCSTParser::array_Conform_Decl() {
  Array_Conform_DeclContext *_localctx = _tracker.createInstance<Array_Conform_DeclContext>(_ctx, getState());
  enterRule(_localctx, 154, PLCSTParser::RuleArray_Conform_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1032);
    variable_List();
    setState(1033);
    match(PLCSTParser::Colon);
    setState(1034);
    array_Conformand();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_Decl_No_InitContext ------------------------------------------------------------------

PLCSTParser::FB_Decl_No_InitContext::FB_Decl_No_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::FB_Decl_No_InitContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::FB_Decl_No_InitContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::FB_Type_AccessContext* PLCSTParser::FB_Decl_No_InitContext::fB_Type_Access() {
  return getRuleContext<PLCSTParser::FB_Type_AccessContext>(0);
}


size_t PLCSTParser::FB_Decl_No_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Decl_No_Init;
}

void PLCSTParser::FB_Decl_No_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Decl_No_Init(this);
}

void PLCSTParser::FB_Decl_No_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Decl_No_Init(this);
}


std::any PLCSTParser::FB_Decl_No_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Decl_No_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_Decl_No_InitContext* PLCSTParser::fB_Decl_No_Init() {
  FB_Decl_No_InitContext *_localctx = _tracker.createInstance<FB_Decl_No_InitContext>(_ctx, getState());
  enterRule(_localctx, 156, PLCSTParser::RuleFB_Decl_No_Init);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1036);
    variable_List();
    setState(1037);
    match(PLCSTParser::Colon);
    setState(1038);
    fB_Type_Access();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_Spec_InitContext ------------------------------------------------------------------

PLCSTParser::FB_Spec_InitContext::FB_Spec_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::FB_Type_AccessContext* PLCSTParser::FB_Spec_InitContext::fB_Type_Access() {
  return getRuleContext<PLCSTParser::FB_Type_AccessContext>(0);
}

tree::TerminalNode* PLCSTParser::FB_Spec_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Struct_InitContext* PLCSTParser::FB_Spec_InitContext::struct_Init() {
  return getRuleContext<PLCSTParser::Struct_InitContext>(0);
}


size_t PLCSTParser::FB_Spec_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Spec_Init;
}

void PLCSTParser::FB_Spec_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Spec_Init(this);
}

void PLCSTParser::FB_Spec_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Spec_Init(this);
}


std::any PLCSTParser::FB_Spec_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Spec_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_Spec_InitContext* PLCSTParser::fB_Spec_Init() {
  FB_Spec_InitContext *_localctx = _tracker.createInstance<FB_Spec_InitContext>(_ctx, getState());
  enterRule(_localctx, 158, PLCSTParser::RuleFB_Spec_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1040);
    fB_Type_Access();
    setState(1043);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(1041);
      match(PLCSTParser::Assign);
      setState(1042);
      struct_Init();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_Instance_NameContext ------------------------------------------------------------------

PLCSTParser::FB_Instance_NameContext::FB_Instance_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::FB_NameContext* PLCSTParser::FB_Instance_NameContext::fB_Name() {
  return getRuleContext<PLCSTParser::FB_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::FB_Instance_NameContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::FB_Instance_NameContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::FB_Instance_NameContext::Caret() {
  return getTokens(PLCSTParser::Caret);
}

tree::TerminalNode* PLCSTParser::FB_Instance_NameContext::Caret(size_t i) {
  return getToken(PLCSTParser::Caret, i);
}


size_t PLCSTParser::FB_Instance_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Instance_Name;
}

void PLCSTParser::FB_Instance_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Instance_Name(this);
}

void PLCSTParser::FB_Instance_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Instance_Name(this);
}


std::any PLCSTParser::FB_Instance_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Instance_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_Instance_NameContext* PLCSTParser::fB_Instance_Name() {
  FB_Instance_NameContext *_localctx = _tracker.createInstance<FB_Instance_NameContext>(_ctx, getState());
  enterRule(_localctx, 160, PLCSTParser::RuleFB_Instance_Name);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1048);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 77, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1045);
        nestedNameSpecifier(); 
      }
      setState(1050);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 77, _ctx);
    }
    setState(1051);
    fB_Name();
    setState(1055);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Caret) {
      setState(1052);
      match(PLCSTParser::Caret);
      setState(1057);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Output_DeclsContext ------------------------------------------------------------------

PLCSTParser::Output_DeclsContext::Output_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Output_DeclsContext::VAR_OUTPUT() {
  return getToken(PLCSTParser::VAR_OUTPUT, 0);
}

tree::TerminalNode* PLCSTParser::Output_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::Output_DeclContext *> PLCSTParser::Output_DeclsContext::output_Decl() {
  return getRuleContexts<PLCSTParser::Output_DeclContext>();
}

PLCSTParser::Output_DeclContext* PLCSTParser::Output_DeclsContext::output_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Output_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Output_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Output_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}

tree::TerminalNode* PLCSTParser::Output_DeclsContext::RETAIN() {
  return getToken(PLCSTParser::RETAIN, 0);
}

tree::TerminalNode* PLCSTParser::Output_DeclsContext::NON_RETAIN() {
  return getToken(PLCSTParser::NON_RETAIN, 0);
}


size_t PLCSTParser::Output_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleOutput_Decls;
}

void PLCSTParser::Output_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterOutput_Decls(this);
}

void PLCSTParser::Output_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitOutput_Decls(this);
}


std::any PLCSTParser::Output_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitOutput_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Output_DeclsContext* PLCSTParser::output_Decls() {
  Output_DeclsContext *_localctx = _tracker.createInstance<Output_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 162, PLCSTParser::RuleOutput_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1058);
    match(PLCSTParser::VAR_OUTPUT);
    setState(1060);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::RETAIN

    || _la == PLCSTParser::NON_RETAIN) {
      setState(1059);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::RETAIN

      || _la == PLCSTParser::NON_RETAIN)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1067);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1062);
      output_Decl();
      setState(1063);
      match(PLCSTParser::Semi);
      setState(1069);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1070);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Output_DeclContext ------------------------------------------------------------------

PLCSTParser::Output_DeclContext::Output_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Var_Decl_InitContext* PLCSTParser::Output_DeclContext::var_Decl_Init() {
  return getRuleContext<PLCSTParser::Var_Decl_InitContext>(0);
}

PLCSTParser::Array_Conform_DeclContext* PLCSTParser::Output_DeclContext::array_Conform_Decl() {
  return getRuleContext<PLCSTParser::Array_Conform_DeclContext>(0);
}


size_t PLCSTParser::Output_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleOutput_Decl;
}

void PLCSTParser::Output_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterOutput_Decl(this);
}

void PLCSTParser::Output_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitOutput_Decl(this);
}


std::any PLCSTParser::Output_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitOutput_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Output_DeclContext* PLCSTParser::output_Decl() {
  Output_DeclContext *_localctx = _tracker.createInstance<Output_DeclContext>(_ctx, getState());
  enterRule(_localctx, 164, PLCSTParser::RuleOutput_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1074);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 81, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1072);
      var_Decl_Init();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1073);
      array_Conform_Decl();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- In_Out_DeclsContext ------------------------------------------------------------------

PLCSTParser::In_Out_DeclsContext::In_Out_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::In_Out_DeclsContext::VAR_IN_OUT() {
  return getToken(PLCSTParser::VAR_IN_OUT, 0);
}

tree::TerminalNode* PLCSTParser::In_Out_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::In_Out_Var_DeclContext *> PLCSTParser::In_Out_DeclsContext::in_Out_Var_Decl() {
  return getRuleContexts<PLCSTParser::In_Out_Var_DeclContext>();
}

PLCSTParser::In_Out_Var_DeclContext* PLCSTParser::In_Out_DeclsContext::in_Out_Var_Decl(size_t i) {
  return getRuleContext<PLCSTParser::In_Out_Var_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::In_Out_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::In_Out_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::In_Out_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleIn_Out_Decls;
}

void PLCSTParser::In_Out_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIn_Out_Decls(this);
}

void PLCSTParser::In_Out_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIn_Out_Decls(this);
}


std::any PLCSTParser::In_Out_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitIn_Out_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::In_Out_DeclsContext* PLCSTParser::in_Out_Decls() {
  In_Out_DeclsContext *_localctx = _tracker.createInstance<In_Out_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 166, PLCSTParser::RuleIn_Out_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1076);
    match(PLCSTParser::VAR_IN_OUT);
    setState(1082);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1077);
      in_Out_Var_Decl();
      setState(1078);
      match(PLCSTParser::Semi);
      setState(1084);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1085);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- In_Out_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::In_Out_Var_DeclContext::In_Out_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Var_DeclContext* PLCSTParser::In_Out_Var_DeclContext::var_Decl() {
  return getRuleContext<PLCSTParser::Var_DeclContext>(0);
}

PLCSTParser::Array_Conform_DeclContext* PLCSTParser::In_Out_Var_DeclContext::array_Conform_Decl() {
  return getRuleContext<PLCSTParser::Array_Conform_DeclContext>(0);
}

PLCSTParser::FB_Decl_No_InitContext* PLCSTParser::In_Out_Var_DeclContext::fB_Decl_No_Init() {
  return getRuleContext<PLCSTParser::FB_Decl_No_InitContext>(0);
}


size_t PLCSTParser::In_Out_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleIn_Out_Var_Decl;
}

void PLCSTParser::In_Out_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIn_Out_Var_Decl(this);
}

void PLCSTParser::In_Out_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIn_Out_Var_Decl(this);
}


std::any PLCSTParser::In_Out_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitIn_Out_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::In_Out_Var_DeclContext* PLCSTParser::in_Out_Var_Decl() {
  In_Out_Var_DeclContext *_localctx = _tracker.createInstance<In_Out_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 168, PLCSTParser::RuleIn_Out_Var_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1090);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 83, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1087);
      var_Decl();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1088);
      array_Conform_Decl();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(1089);
      fB_Decl_No_Init();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Var_DeclContext ------------------------------------------------------------------

PLCSTParser::Var_DeclContext::Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::Var_DeclContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Var_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Simple_SpecContext* PLCSTParser::Var_DeclContext::simple_Spec() {
  return getRuleContext<PLCSTParser::Simple_SpecContext>(0);
}

PLCSTParser::Str_Var_DeclContext* PLCSTParser::Var_DeclContext::str_Var_Decl() {
  return getRuleContext<PLCSTParser::Str_Var_DeclContext>(0);
}

PLCSTParser::Array_Var_DeclContext* PLCSTParser::Var_DeclContext::array_Var_Decl() {
  return getRuleContext<PLCSTParser::Array_Var_DeclContext>(0);
}

PLCSTParser::Struct_Var_DeclContext* PLCSTParser::Var_DeclContext::struct_Var_Decl() {
  return getRuleContext<PLCSTParser::Struct_Var_DeclContext>(0);
}


size_t PLCSTParser::Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleVar_Decl;
}

void PLCSTParser::Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVar_Decl(this);
}

void PLCSTParser::Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVar_Decl(this);
}


std::any PLCSTParser::Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitVar_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Var_DeclContext* PLCSTParser::var_Decl() {
  Var_DeclContext *_localctx = _tracker.createInstance<Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 170, PLCSTParser::RuleVar_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1092);
    variable_List();
    setState(1093);
    match(PLCSTParser::Colon);
    setState(1098);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 84, _ctx)) {
    case 1: {
      setState(1094);
      simple_Spec();
      break;
    }

    case 2: {
      setState(1095);
      str_Var_Decl();
      break;
    }

    case 3: {
      setState(1096);
      array_Var_Decl();
      break;
    }

    case 4: {
      setState(1097);
      struct_Var_Decl();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Array_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::Array_Var_DeclContext::Array_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::Array_Var_DeclContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Array_Var_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Array_SpecContext* PLCSTParser::Array_Var_DeclContext::array_Spec() {
  return getRuleContext<PLCSTParser::Array_SpecContext>(0);
}


size_t PLCSTParser::Array_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleArray_Var_Decl;
}

void PLCSTParser::Array_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArray_Var_Decl(this);
}

void PLCSTParser::Array_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArray_Var_Decl(this);
}


std::any PLCSTParser::Array_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitArray_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Array_Var_DeclContext* PLCSTParser::array_Var_Decl() {
  Array_Var_DeclContext *_localctx = _tracker.createInstance<Array_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 172, PLCSTParser::RuleArray_Var_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1100);
    variable_List();
    setState(1101);
    match(PLCSTParser::Colon);
    setState(1102);
    array_Spec();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::Struct_Var_DeclContext::Struct_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::Struct_Var_DeclContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Struct_Var_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Struct_Type_AccessContext* PLCSTParser::Struct_Var_DeclContext::struct_Type_Access() {
  return getRuleContext<PLCSTParser::Struct_Type_AccessContext>(0);
}


size_t PLCSTParser::Struct_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Var_Decl;
}

void PLCSTParser::Struct_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Var_Decl(this);
}

void PLCSTParser::Struct_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Var_Decl(this);
}


std::any PLCSTParser::Struct_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_Var_DeclContext* PLCSTParser::struct_Var_Decl() {
  Struct_Var_DeclContext *_localctx = _tracker.createInstance<Struct_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 174, PLCSTParser::RuleStruct_Var_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1104);
    variable_List();
    setState(1105);
    match(PLCSTParser::Colon);
    setState(1106);
    struct_Type_Access();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::Var_DeclsContext::Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Var_DeclsContext::VAR() {
  return getToken(PLCSTParser::VAR, 0);
}

tree::TerminalNode* PLCSTParser::Var_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

tree::TerminalNode* PLCSTParser::Var_DeclsContext::CONSTANT() {
  return getToken(PLCSTParser::CONSTANT, 0);
}

PLCSTParser::Access_SpecContext* PLCSTParser::Var_DeclsContext::access_Spec() {
  return getRuleContext<PLCSTParser::Access_SpecContext>(0);
}

std::vector<PLCSTParser::Var_Decl_InitContext *> PLCSTParser::Var_DeclsContext::var_Decl_Init() {
  return getRuleContexts<PLCSTParser::Var_Decl_InitContext>();
}

PLCSTParser::Var_Decl_InitContext* PLCSTParser::Var_DeclsContext::var_Decl_Init(size_t i) {
  return getRuleContext<PLCSTParser::Var_Decl_InitContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Var_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Var_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleVar_Decls;
}

void PLCSTParser::Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVar_Decls(this);
}

void PLCSTParser::Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVar_Decls(this);
}


std::any PLCSTParser::Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitVar_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Var_DeclsContext* PLCSTParser::var_Decls() {
  Var_DeclsContext *_localctx = _tracker.createInstance<Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 176, PLCSTParser::RuleVar_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1108);
    match(PLCSTParser::VAR);
    setState(1110);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::CONSTANT) {
      setState(1109);
      match(PLCSTParser::CONSTANT);
    }
    setState(1113);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la - 86) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 86)) & 536870919) != 0) {
      setState(1112);
      access_Spec();
    }
    setState(1120);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1115);
      var_Decl_Init();
      setState(1116);
      match(PLCSTParser::Semi);
      setState(1122);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1123);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Retain_Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::Retain_Var_DeclsContext::Retain_Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Retain_Var_DeclsContext::VAR() {
  return getToken(PLCSTParser::VAR, 0);
}

tree::TerminalNode* PLCSTParser::Retain_Var_DeclsContext::RETAIN() {
  return getToken(PLCSTParser::RETAIN, 0);
}

tree::TerminalNode* PLCSTParser::Retain_Var_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

PLCSTParser::Access_SpecContext* PLCSTParser::Retain_Var_DeclsContext::access_Spec() {
  return getRuleContext<PLCSTParser::Access_SpecContext>(0);
}

std::vector<PLCSTParser::Var_Decl_InitContext *> PLCSTParser::Retain_Var_DeclsContext::var_Decl_Init() {
  return getRuleContexts<PLCSTParser::Var_Decl_InitContext>();
}

PLCSTParser::Var_Decl_InitContext* PLCSTParser::Retain_Var_DeclsContext::var_Decl_Init(size_t i) {
  return getRuleContext<PLCSTParser::Var_Decl_InitContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Retain_Var_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Retain_Var_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::Retain_Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleRetain_Var_Decls;
}

void PLCSTParser::Retain_Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRetain_Var_Decls(this);
}

void PLCSTParser::Retain_Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRetain_Var_Decls(this);
}


std::any PLCSTParser::Retain_Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRetain_Var_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Retain_Var_DeclsContext* PLCSTParser::retain_Var_Decls() {
  Retain_Var_DeclsContext *_localctx = _tracker.createInstance<Retain_Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 178, PLCSTParser::RuleRetain_Var_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1125);
    match(PLCSTParser::VAR);
    setState(1126);
    match(PLCSTParser::RETAIN);
    setState(1128);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la - 86) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 86)) & 536870919) != 0) {
      setState(1127);
      access_Spec();
    }
    setState(1135);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1130);
      var_Decl_Init();
      setState(1131);
      match(PLCSTParser::Semi);
      setState(1137);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1138);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Loc_Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::Loc_Var_DeclsContext::Loc_Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Loc_Var_DeclsContext::VAR() {
  return getToken(PLCSTParser::VAR, 0);
}

tree::TerminalNode* PLCSTParser::Loc_Var_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::Loc_Var_DeclContext *> PLCSTParser::Loc_Var_DeclsContext::loc_Var_Decl() {
  return getRuleContexts<PLCSTParser::Loc_Var_DeclContext>();
}

PLCSTParser::Loc_Var_DeclContext* PLCSTParser::Loc_Var_DeclsContext::loc_Var_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Loc_Var_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Loc_Var_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Loc_Var_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}

tree::TerminalNode* PLCSTParser::Loc_Var_DeclsContext::CONSTANT() {
  return getToken(PLCSTParser::CONSTANT, 0);
}

tree::TerminalNode* PLCSTParser::Loc_Var_DeclsContext::RETAIN() {
  return getToken(PLCSTParser::RETAIN, 0);
}

tree::TerminalNode* PLCSTParser::Loc_Var_DeclsContext::NON_RETAIN() {
  return getToken(PLCSTParser::NON_RETAIN, 0);
}


size_t PLCSTParser::Loc_Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleLoc_Var_Decls;
}

void PLCSTParser::Loc_Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLoc_Var_Decls(this);
}

void PLCSTParser::Loc_Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLoc_Var_Decls(this);
}


std::any PLCSTParser::Loc_Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitLoc_Var_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Loc_Var_DeclsContext* PLCSTParser::loc_Var_Decls() {
  Loc_Var_DeclsContext *_localctx = _tracker.createInstance<Loc_Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 180, PLCSTParser::RuleLoc_Var_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1140);
    match(PLCSTParser::VAR);
    setState(1142);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 2359886204742139904) != 0) {
      setState(1141);
      _la = _input->LA(1);
      if (!(((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & 2359886204742139904) != 0)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1149);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 65) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 65)) & 3221225473) != 0 || _la == PLCSTParser::Identifier) {
      setState(1144);
      loc_Var_Decl();
      setState(1145);
      match(PLCSTParser::Semi);
      setState(1151);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1152);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Loc_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::Loc_Var_DeclContext::Loc_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Located_AtContext* PLCSTParser::Loc_Var_DeclContext::located_At() {
  return getRuleContext<PLCSTParser::Located_AtContext>(0);
}

tree::TerminalNode* PLCSTParser::Loc_Var_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Loc_Var_Spec_InitContext* PLCSTParser::Loc_Var_DeclContext::loc_Var_Spec_Init() {
  return getRuleContext<PLCSTParser::Loc_Var_Spec_InitContext>(0);
}

PLCSTParser::Variable_NameContext* PLCSTParser::Loc_Var_DeclContext::variable_Name() {
  return getRuleContext<PLCSTParser::Variable_NameContext>(0);
}


size_t PLCSTParser::Loc_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleLoc_Var_Decl;
}

void PLCSTParser::Loc_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLoc_Var_Decl(this);
}

void PLCSTParser::Loc_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLoc_Var_Decl(this);
}


std::any PLCSTParser::Loc_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitLoc_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Loc_Var_DeclContext* PLCSTParser::loc_Var_Decl() {
  Loc_Var_DeclContext *_localctx = _tracker.createInstance<Loc_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 182, PLCSTParser::RuleLoc_Var_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1155);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1154);
      variable_Name();
    }
    setState(1157);
    located_At();
    setState(1158);
    match(PLCSTParser::Colon);
    setState(1159);
    loc_Var_Spec_Init();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Temp_Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::Temp_Var_DeclsContext::Temp_Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Temp_Var_DeclsContext::VAR_TEMP() {
  return getToken(PLCSTParser::VAR_TEMP, 0);
}

tree::TerminalNode* PLCSTParser::Temp_Var_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Temp_Var_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Temp_Var_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}

std::vector<PLCSTParser::Var_DeclContext *> PLCSTParser::Temp_Var_DeclsContext::var_Decl() {
  return getRuleContexts<PLCSTParser::Var_DeclContext>();
}

PLCSTParser::Var_DeclContext* PLCSTParser::Temp_Var_DeclsContext::var_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Var_DeclContext>(i);
}

std::vector<PLCSTParser::Ref_Var_DeclContext *> PLCSTParser::Temp_Var_DeclsContext::ref_Var_Decl() {
  return getRuleContexts<PLCSTParser::Ref_Var_DeclContext>();
}

PLCSTParser::Ref_Var_DeclContext* PLCSTParser::Temp_Var_DeclsContext::ref_Var_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Ref_Var_DeclContext>(i);
}

std::vector<PLCSTParser::Interface_Var_DeclContext *> PLCSTParser::Temp_Var_DeclsContext::interface_Var_Decl() {
  return getRuleContexts<PLCSTParser::Interface_Var_DeclContext>();
}

PLCSTParser::Interface_Var_DeclContext* PLCSTParser::Temp_Var_DeclsContext::interface_Var_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Interface_Var_DeclContext>(i);
}


size_t PLCSTParser::Temp_Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleTemp_Var_Decls;
}

void PLCSTParser::Temp_Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTemp_Var_Decls(this);
}

void PLCSTParser::Temp_Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTemp_Var_Decls(this);
}


std::any PLCSTParser::Temp_Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitTemp_Var_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Temp_Var_DeclsContext* PLCSTParser::temp_Var_Decls() {
  Temp_Var_DeclsContext *_localctx = _tracker.createInstance<Temp_Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 184, PLCSTParser::RuleTemp_Var_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1161);
    match(PLCSTParser::VAR_TEMP);
    setState(1171);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1165);
      _errHandler->sync(this);
      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 93, _ctx)) {
      case 1: {
        setState(1162);
        var_Decl();
        break;
      }

      case 2: {
        setState(1163);
        ref_Var_Decl();
        break;
      }

      case 3: {
        setState(1164);
        interface_Var_Decl();
        break;
      }

      default:
        break;
      }
      setState(1167);
      match(PLCSTParser::Semi);
      setState(1173);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1174);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- External_Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::External_Var_DeclsContext::External_Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::External_Var_DeclsContext::VAR_EXTERNAL() {
  return getToken(PLCSTParser::VAR_EXTERNAL, 0);
}

tree::TerminalNode* PLCSTParser::External_Var_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

tree::TerminalNode* PLCSTParser::External_Var_DeclsContext::CONSTANT() {
  return getToken(PLCSTParser::CONSTANT, 0);
}

std::vector<PLCSTParser::External_DeclContext *> PLCSTParser::External_Var_DeclsContext::external_Decl() {
  return getRuleContexts<PLCSTParser::External_DeclContext>();
}

PLCSTParser::External_DeclContext* PLCSTParser::External_Var_DeclsContext::external_Decl(size_t i) {
  return getRuleContext<PLCSTParser::External_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::External_Var_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::External_Var_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::External_Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleExternal_Var_Decls;
}

void PLCSTParser::External_Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterExternal_Var_Decls(this);
}

void PLCSTParser::External_Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitExternal_Var_Decls(this);
}


std::any PLCSTParser::External_Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitExternal_Var_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::External_Var_DeclsContext* PLCSTParser::external_Var_Decls() {
  External_Var_DeclsContext *_localctx = _tracker.createInstance<External_Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 186, PLCSTParser::RuleExternal_Var_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1176);
    match(PLCSTParser::VAR_EXTERNAL);
    setState(1178);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::CONSTANT) {
      setState(1177);
      match(PLCSTParser::CONSTANT);
    }
    setState(1185);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1180);
      external_Decl();
      setState(1181);
      match(PLCSTParser::Semi);
      setState(1187);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1188);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- External_DeclContext ------------------------------------------------------------------

PLCSTParser::External_DeclContext::External_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Global_Var_NameContext* PLCSTParser::External_DeclContext::global_Var_Name() {
  return getRuleContext<PLCSTParser::Global_Var_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::External_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Simple_SpecContext* PLCSTParser::External_DeclContext::simple_Spec() {
  return getRuleContext<PLCSTParser::Simple_SpecContext>(0);
}

PLCSTParser::Array_SpecContext* PLCSTParser::External_DeclContext::array_Spec() {
  return getRuleContext<PLCSTParser::Array_SpecContext>(0);
}

PLCSTParser::Struct_Type_AccessContext* PLCSTParser::External_DeclContext::struct_Type_Access() {
  return getRuleContext<PLCSTParser::Struct_Type_AccessContext>(0);
}

PLCSTParser::FB_Type_AccessContext* PLCSTParser::External_DeclContext::fB_Type_Access() {
  return getRuleContext<PLCSTParser::FB_Type_AccessContext>(0);
}

PLCSTParser::Ref_Type_AccessContext* PLCSTParser::External_DeclContext::ref_Type_Access() {
  return getRuleContext<PLCSTParser::Ref_Type_AccessContext>(0);
}


size_t PLCSTParser::External_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleExternal_Decl;
}

void PLCSTParser::External_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterExternal_Decl(this);
}

void PLCSTParser::External_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitExternal_Decl(this);
}


std::any PLCSTParser::External_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitExternal_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::External_DeclContext* PLCSTParser::external_Decl() {
  External_DeclContext *_localctx = _tracker.createInstance<External_DeclContext>(_ctx, getState());
  enterRule(_localctx, 188, PLCSTParser::RuleExternal_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1190);
    global_Var_Name();
    setState(1191);
    match(PLCSTParser::Colon);
    setState(1197);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 97, _ctx)) {
    case 1: {
      setState(1192);
      simple_Spec();
      break;
    }

    case 2: {
      setState(1193);
      array_Spec();
      break;
    }

    case 3: {
      setState(1194);
      struct_Type_Access();
      break;
    }

    case 4: {
      setState(1195);
      fB_Type_Access();
      break;
    }

    case 5: {
      setState(1196);
      ref_Type_Access();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Global_Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::Global_Var_DeclsContext::Global_Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Global_Var_DeclsContext::VAR_GLOBAL() {
  return getToken(PLCSTParser::VAR_GLOBAL, 0);
}

tree::TerminalNode* PLCSTParser::Global_Var_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::Global_Var_DeclContext *> PLCSTParser::Global_Var_DeclsContext::global_Var_Decl() {
  return getRuleContexts<PLCSTParser::Global_Var_DeclContext>();
}

PLCSTParser::Global_Var_DeclContext* PLCSTParser::Global_Var_DeclsContext::global_Var_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Global_Var_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Global_Var_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Global_Var_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}

tree::TerminalNode* PLCSTParser::Global_Var_DeclsContext::CONSTANT() {
  return getToken(PLCSTParser::CONSTANT, 0);
}

tree::TerminalNode* PLCSTParser::Global_Var_DeclsContext::RETAIN() {
  return getToken(PLCSTParser::RETAIN, 0);
}


size_t PLCSTParser::Global_Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleGlobal_Var_Decls;
}

void PLCSTParser::Global_Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterGlobal_Var_Decls(this);
}

void PLCSTParser::Global_Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitGlobal_Var_Decls(this);
}


std::any PLCSTParser::Global_Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitGlobal_Var_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Global_Var_DeclsContext* PLCSTParser::global_Var_Decls() {
  Global_Var_DeclsContext *_localctx = _tracker.createInstance<Global_Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 190, PLCSTParser::RuleGlobal_Var_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1199);
    match(PLCSTParser::VAR_GLOBAL);
    setState(1201);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::RETAIN

    || _la == PLCSTParser::CONSTANT) {
      setState(1200);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::RETAIN

      || _la == PLCSTParser::CONSTANT)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1208);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1203);
      global_Var_Decl();
      setState(1204);
      match(PLCSTParser::Semi);
      setState(1210);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1211);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Global_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::Global_Var_DeclContext::Global_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Global_Var_SpecContext* PLCSTParser::Global_Var_DeclContext::global_Var_Spec() {
  return getRuleContext<PLCSTParser::Global_Var_SpecContext>(0);
}

tree::TerminalNode* PLCSTParser::Global_Var_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Loc_Var_Spec_InitContext* PLCSTParser::Global_Var_DeclContext::loc_Var_Spec_Init() {
  return getRuleContext<PLCSTParser::Loc_Var_Spec_InitContext>(0);
}

PLCSTParser::FB_Type_AccessContext* PLCSTParser::Global_Var_DeclContext::fB_Type_Access() {
  return getRuleContext<PLCSTParser::FB_Type_AccessContext>(0);
}


size_t PLCSTParser::Global_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleGlobal_Var_Decl;
}

void PLCSTParser::Global_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterGlobal_Var_Decl(this);
}

void PLCSTParser::Global_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitGlobal_Var_Decl(this);
}


std::any PLCSTParser::Global_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitGlobal_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Global_Var_DeclContext* PLCSTParser::global_Var_Decl() {
  Global_Var_DeclContext *_localctx = _tracker.createInstance<Global_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 192, PLCSTParser::RuleGlobal_Var_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1213);
    global_Var_Spec();
    setState(1214);
    match(PLCSTParser::Colon);
    setState(1217);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 100, _ctx)) {
    case 1: {
      setState(1215);
      loc_Var_Spec_Init();
      break;
    }

    case 2: {
      setState(1216);
      fB_Type_Access();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Global_Var_SpecContext ------------------------------------------------------------------

PLCSTParser::Global_Var_SpecContext::Global_Var_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Global_Var_NameContext *> PLCSTParser::Global_Var_SpecContext::global_Var_Name() {
  return getRuleContexts<PLCSTParser::Global_Var_NameContext>();
}

PLCSTParser::Global_Var_NameContext* PLCSTParser::Global_Var_SpecContext::global_Var_Name(size_t i) {
  return getRuleContext<PLCSTParser::Global_Var_NameContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Global_Var_SpecContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Global_Var_SpecContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}

PLCSTParser::Located_AtContext* PLCSTParser::Global_Var_SpecContext::located_At() {
  return getRuleContext<PLCSTParser::Located_AtContext>(0);
}


size_t PLCSTParser::Global_Var_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleGlobal_Var_Spec;
}

void PLCSTParser::Global_Var_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterGlobal_Var_Spec(this);
}

void PLCSTParser::Global_Var_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitGlobal_Var_Spec(this);
}


std::any PLCSTParser::Global_Var_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitGlobal_Var_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Global_Var_SpecContext* PLCSTParser::global_Var_Spec() {
  Global_Var_SpecContext *_localctx = _tracker.createInstance<Global_Var_SpecContext>(_ctx, getState());
  enterRule(_localctx, 194, PLCSTParser::RuleGlobal_Var_Spec);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1230);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 102, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1219);
      global_Var_Name();
      setState(1224);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (_la == PLCSTParser::Comma) {
        setState(1220);
        match(PLCSTParser::Comma);
        setState(1221);
        global_Var_Name();
        setState(1226);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1227);
      global_Var_Name();
      setState(1228);
      located_At();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Loc_Var_Spec_InitContext ------------------------------------------------------------------

PLCSTParser::Loc_Var_Spec_InitContext::Loc_Var_Spec_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Simple_Spec_InitContext* PLCSTParser::Loc_Var_Spec_InitContext::simple_Spec_Init() {
  return getRuleContext<PLCSTParser::Simple_Spec_InitContext>(0);
}

PLCSTParser::Array_Spec_InitContext* PLCSTParser::Loc_Var_Spec_InitContext::array_Spec_Init() {
  return getRuleContext<PLCSTParser::Array_Spec_InitContext>(0);
}

PLCSTParser::Struct_Spec_InitContext* PLCSTParser::Loc_Var_Spec_InitContext::struct_Spec_Init() {
  return getRuleContext<PLCSTParser::Struct_Spec_InitContext>(0);
}

PLCSTParser::S_Byte_Str_SpecContext* PLCSTParser::Loc_Var_Spec_InitContext::s_Byte_Str_Spec() {
  return getRuleContext<PLCSTParser::S_Byte_Str_SpecContext>(0);
}

PLCSTParser::D_Byte_Str_SpecContext* PLCSTParser::Loc_Var_Spec_InitContext::d_Byte_Str_Spec() {
  return getRuleContext<PLCSTParser::D_Byte_Str_SpecContext>(0);
}


size_t PLCSTParser::Loc_Var_Spec_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleLoc_Var_Spec_Init;
}

void PLCSTParser::Loc_Var_Spec_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLoc_Var_Spec_Init(this);
}

void PLCSTParser::Loc_Var_Spec_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLoc_Var_Spec_Init(this);
}


std::any PLCSTParser::Loc_Var_Spec_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitLoc_Var_Spec_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Loc_Var_Spec_InitContext* PLCSTParser::loc_Var_Spec_Init() {
  Loc_Var_Spec_InitContext *_localctx = _tracker.createInstance<Loc_Var_Spec_InitContext>(_ctx, getState());
  enterRule(_localctx, 196, PLCSTParser::RuleLoc_Var_Spec_Init);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1237);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 103, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1232);
      simple_Spec_Init();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1233);
      array_Spec_Init();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(1234);
      struct_Spec_Init();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(1235);
      s_Byte_Str_Spec();
      break;
    }

    case 5: {
      enterOuterAlt(_localctx, 5);
      setState(1236);
      d_Byte_Str_Spec();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Located_AtContext ------------------------------------------------------------------

PLCSTParser::Located_AtContext::Located_AtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Located_AtContext::AT() {
  return getToken(PLCSTParser::AT, 0);
}

tree::TerminalNode* PLCSTParser::Located_AtContext::Direct_Variable() {
  return getToken(PLCSTParser::Direct_Variable, 0);
}


size_t PLCSTParser::Located_AtContext::getRuleIndex() const {
  return PLCSTParser::RuleLocated_At;
}

void PLCSTParser::Located_AtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLocated_At(this);
}

void PLCSTParser::Located_AtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLocated_At(this);
}


std::any PLCSTParser::Located_AtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitLocated_At(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Located_AtContext* PLCSTParser::located_At() {
  Located_AtContext *_localctx = _tracker.createInstance<Located_AtContext>(_ctx, getState());
  enterRule(_localctx, 198, PLCSTParser::RuleLocated_At);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1239);
    match(PLCSTParser::AT);
    setState(1240);
    match(PLCSTParser::Direct_Variable);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Str_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::Str_Var_DeclContext::Str_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::S_Byte_Str_Var_DeclContext* PLCSTParser::Str_Var_DeclContext::s_Byte_Str_Var_Decl() {
  return getRuleContext<PLCSTParser::S_Byte_Str_Var_DeclContext>(0);
}

PLCSTParser::D_Byte_Str_Var_DeclContext* PLCSTParser::Str_Var_DeclContext::d_Byte_Str_Var_Decl() {
  return getRuleContext<PLCSTParser::D_Byte_Str_Var_DeclContext>(0);
}


size_t PLCSTParser::Str_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleStr_Var_Decl;
}

void PLCSTParser::Str_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStr_Var_Decl(this);
}

void PLCSTParser::Str_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStr_Var_Decl(this);
}


std::any PLCSTParser::Str_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStr_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Str_Var_DeclContext* PLCSTParser::str_Var_Decl() {
  Str_Var_DeclContext *_localctx = _tracker.createInstance<Str_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 200, PLCSTParser::RuleStr_Var_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1244);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 104, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1242);
      s_Byte_Str_Var_Decl();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1243);
      d_Byte_Str_Var_Decl();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- S_Byte_Str_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::S_Byte_Str_Var_DeclContext::S_Byte_Str_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::S_Byte_Str_Var_DeclContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::S_Byte_Str_Var_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::S_Byte_Str_SpecContext* PLCSTParser::S_Byte_Str_Var_DeclContext::s_Byte_Str_Spec() {
  return getRuleContext<PLCSTParser::S_Byte_Str_SpecContext>(0);
}


size_t PLCSTParser::S_Byte_Str_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleS_Byte_Str_Var_Decl;
}

void PLCSTParser::S_Byte_Str_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterS_Byte_Str_Var_Decl(this);
}

void PLCSTParser::S_Byte_Str_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitS_Byte_Str_Var_Decl(this);
}


std::any PLCSTParser::S_Byte_Str_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitS_Byte_Str_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::S_Byte_Str_Var_DeclContext* PLCSTParser::s_Byte_Str_Var_Decl() {
  S_Byte_Str_Var_DeclContext *_localctx = _tracker.createInstance<S_Byte_Str_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 202, PLCSTParser::RuleS_Byte_Str_Var_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1246);
    variable_List();
    setState(1247);
    match(PLCSTParser::Colon);
    setState(1248);
    s_Byte_Str_Spec();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- S_Byte_Str_SpecContext ------------------------------------------------------------------

PLCSTParser::S_Byte_Str_SpecContext::S_Byte_Str_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::S_Byte_Str_SpecContext::SString_Type_Name() {
  return getToken(PLCSTParser::SString_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::S_Byte_Str_SpecContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

tree::TerminalNode* PLCSTParser::S_Byte_Str_SpecContext::S_Byte_Char_Str() {
  return getToken(PLCSTParser::S_Byte_Char_Str, 0);
}


size_t PLCSTParser::S_Byte_Str_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleS_Byte_Str_Spec;
}

void PLCSTParser::S_Byte_Str_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterS_Byte_Str_Spec(this);
}

void PLCSTParser::S_Byte_Str_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitS_Byte_Str_Spec(this);
}


std::any PLCSTParser::S_Byte_Str_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitS_Byte_Str_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::S_Byte_Str_SpecContext* PLCSTParser::s_Byte_Str_Spec() {
  S_Byte_Str_SpecContext *_localctx = _tracker.createInstance<S_Byte_Str_SpecContext>(_ctx, getState());
  enterRule(_localctx, 204, PLCSTParser::RuleS_Byte_Str_Spec);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1250);
    match(PLCSTParser::SString_Type_Name);
    setState(1253);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(1251);
      match(PLCSTParser::Assign);
      setState(1252);
      match(PLCSTParser::S_Byte_Char_Str);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- D_Byte_Str_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::D_Byte_Str_Var_DeclContext::D_Byte_Str_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::D_Byte_Str_Var_DeclContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::D_Byte_Str_Var_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::D_Byte_Str_SpecContext* PLCSTParser::D_Byte_Str_Var_DeclContext::d_Byte_Str_Spec() {
  return getRuleContext<PLCSTParser::D_Byte_Str_SpecContext>(0);
}


size_t PLCSTParser::D_Byte_Str_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleD_Byte_Str_Var_Decl;
}

void PLCSTParser::D_Byte_Str_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterD_Byte_Str_Var_Decl(this);
}

void PLCSTParser::D_Byte_Str_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitD_Byte_Str_Var_Decl(this);
}


std::any PLCSTParser::D_Byte_Str_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitD_Byte_Str_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::D_Byte_Str_Var_DeclContext* PLCSTParser::d_Byte_Str_Var_Decl() {
  D_Byte_Str_Var_DeclContext *_localctx = _tracker.createInstance<D_Byte_Str_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 206, PLCSTParser::RuleD_Byte_Str_Var_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1255);
    variable_List();
    setState(1256);
    match(PLCSTParser::Colon);
    setState(1257);
    d_Byte_Str_Spec();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- D_Byte_Str_SpecContext ------------------------------------------------------------------

PLCSTParser::D_Byte_Str_SpecContext::D_Byte_Str_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::D_Byte_Str_SpecContext::WString_Type_Name() {
  return getToken(PLCSTParser::WString_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::D_Byte_Str_SpecContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

tree::TerminalNode* PLCSTParser::D_Byte_Str_SpecContext::D_Byte_Char_Str() {
  return getToken(PLCSTParser::D_Byte_Char_Str, 0);
}


size_t PLCSTParser::D_Byte_Str_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleD_Byte_Str_Spec;
}

void PLCSTParser::D_Byte_Str_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterD_Byte_Str_Spec(this);
}

void PLCSTParser::D_Byte_Str_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitD_Byte_Str_Spec(this);
}


std::any PLCSTParser::D_Byte_Str_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitD_Byte_Str_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::D_Byte_Str_SpecContext* PLCSTParser::d_Byte_Str_Spec() {
  D_Byte_Str_SpecContext *_localctx = _tracker.createInstance<D_Byte_Str_SpecContext>(_ctx, getState());
  enterRule(_localctx, 208, PLCSTParser::RuleD_Byte_Str_Spec);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1259);
    match(PLCSTParser::WString_Type_Name);
    setState(1262);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(1260);
      match(PLCSTParser::Assign);
      setState(1261);
      match(PLCSTParser::D_Byte_Char_Str);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Loc_Partly_Var_DeclContext ------------------------------------------------------------------

PLCSTParser::Loc_Partly_Var_DeclContext::Loc_Partly_Var_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Loc_Partly_Var_DeclContext::VAR() {
  return getToken(PLCSTParser::VAR, 0);
}

tree::TerminalNode* PLCSTParser::Loc_Partly_Var_DeclContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::Loc_Partly_VarContext *> PLCSTParser::Loc_Partly_Var_DeclContext::loc_Partly_Var() {
  return getRuleContexts<PLCSTParser::Loc_Partly_VarContext>();
}

PLCSTParser::Loc_Partly_VarContext* PLCSTParser::Loc_Partly_Var_DeclContext::loc_Partly_Var(size_t i) {
  return getRuleContext<PLCSTParser::Loc_Partly_VarContext>(i);
}

tree::TerminalNode* PLCSTParser::Loc_Partly_Var_DeclContext::RETAIN() {
  return getToken(PLCSTParser::RETAIN, 0);
}

tree::TerminalNode* PLCSTParser::Loc_Partly_Var_DeclContext::NON_RETAIN() {
  return getToken(PLCSTParser::NON_RETAIN, 0);
}


size_t PLCSTParser::Loc_Partly_Var_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleLoc_Partly_Var_Decl;
}

void PLCSTParser::Loc_Partly_Var_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLoc_Partly_Var_Decl(this);
}

void PLCSTParser::Loc_Partly_Var_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLoc_Partly_Var_Decl(this);
}


std::any PLCSTParser::Loc_Partly_Var_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitLoc_Partly_Var_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Loc_Partly_Var_DeclContext* PLCSTParser::loc_Partly_Var_Decl() {
  Loc_Partly_Var_DeclContext *_localctx = _tracker.createInstance<Loc_Partly_Var_DeclContext>(_ctx, getState());
  enterRule(_localctx, 210, PLCSTParser::RuleLoc_Partly_Var_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1264);
    match(PLCSTParser::VAR);
    setState(1266);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::RETAIN

    || _la == PLCSTParser::NON_RETAIN) {
      setState(1265);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::RETAIN

      || _la == PLCSTParser::NON_RETAIN)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1271);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1268);
      loc_Partly_Var();
      setState(1273);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1274);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Loc_Partly_VarContext ------------------------------------------------------------------

PLCSTParser::Loc_Partly_VarContext::Loc_Partly_VarContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_NameContext* PLCSTParser::Loc_Partly_VarContext::variable_Name() {
  return getRuleContext<PLCSTParser::Variable_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Loc_Partly_VarContext::AT() {
  return getToken(PLCSTParser::AT, 0);
}

tree::TerminalNode* PLCSTParser::Loc_Partly_VarContext::Var_Location() {
  return getToken(PLCSTParser::Var_Location, 0);
}

tree::TerminalNode* PLCSTParser::Loc_Partly_VarContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Var_SpecContext* PLCSTParser::Loc_Partly_VarContext::var_Spec() {
  return getRuleContext<PLCSTParser::Var_SpecContext>(0);
}

tree::TerminalNode* PLCSTParser::Loc_Partly_VarContext::Semi() {
  return getToken(PLCSTParser::Semi, 0);
}


size_t PLCSTParser::Loc_Partly_VarContext::getRuleIndex() const {
  return PLCSTParser::RuleLoc_Partly_Var;
}

void PLCSTParser::Loc_Partly_VarContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterLoc_Partly_Var(this);
}

void PLCSTParser::Loc_Partly_VarContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitLoc_Partly_Var(this);
}


std::any PLCSTParser::Loc_Partly_VarContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitLoc_Partly_Var(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Loc_Partly_VarContext* PLCSTParser::loc_Partly_Var() {
  Loc_Partly_VarContext *_localctx = _tracker.createInstance<Loc_Partly_VarContext>(_ctx, getState());
  enterRule(_localctx, 212, PLCSTParser::RuleLoc_Partly_Var);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1276);
    variable_Name();
    setState(1277);
    match(PLCSTParser::AT);
    setState(1278);
    match(PLCSTParser::Var_Location);
    setState(1279);
    match(PLCSTParser::Colon);
    setState(1280);
    var_Spec();
    setState(1281);
    match(PLCSTParser::Semi);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Var_SpecContext ------------------------------------------------------------------

PLCSTParser::Var_SpecContext::Var_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Simple_SpecContext* PLCSTParser::Var_SpecContext::simple_Spec() {
  return getRuleContext<PLCSTParser::Simple_SpecContext>(0);
}

PLCSTParser::Array_SpecContext* PLCSTParser::Var_SpecContext::array_Spec() {
  return getRuleContext<PLCSTParser::Array_SpecContext>(0);
}

PLCSTParser::Struct_Type_AccessContext* PLCSTParser::Var_SpecContext::struct_Type_Access() {
  return getRuleContext<PLCSTParser::Struct_Type_AccessContext>(0);
}

tree::TerminalNode* PLCSTParser::Var_SpecContext::SString_Type_Name() {
  return getToken(PLCSTParser::SString_Type_Name, 0);
}

tree::TerminalNode* PLCSTParser::Var_SpecContext::WString_Type_Name() {
  return getToken(PLCSTParser::WString_Type_Name, 0);
}


size_t PLCSTParser::Var_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleVar_Spec;
}

void PLCSTParser::Var_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVar_Spec(this);
}

void PLCSTParser::Var_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVar_Spec(this);
}


std::any PLCSTParser::Var_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitVar_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Var_SpecContext* PLCSTParser::var_Spec() {
  Var_SpecContext *_localctx = _tracker.createInstance<Var_SpecContext>(_ctx, getState());
  enterRule(_localctx, 214, PLCSTParser::RuleVar_Spec);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1287);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 109, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1283);
      simple_Spec();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1284);
      array_Spec();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(1285);
      struct_Type_Access();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(1286);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::SString_Type_Name

      || _la == PLCSTParser::WString_Type_Name)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Func_NameContext ------------------------------------------------------------------

PLCSTParser::Func_NameContext::Func_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Func_NameContext::Std_Func_Name() {
  return getToken(PLCSTParser::Std_Func_Name, 0);
}

PLCSTParser::Derived_Func_NameContext* PLCSTParser::Func_NameContext::derived_Func_Name() {
  return getRuleContext<PLCSTParser::Derived_Func_NameContext>(0);
}


size_t PLCSTParser::Func_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleFunc_Name;
}

void PLCSTParser::Func_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunc_Name(this);
}

void PLCSTParser::Func_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunc_Name(this);
}


std::any PLCSTParser::Func_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFunc_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Func_NameContext* PLCSTParser::func_Name() {
  Func_NameContext *_localctx = _tracker.createInstance<Func_NameContext>(_ctx, getState());
  enterRule(_localctx, 216, PLCSTParser::RuleFunc_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1291);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::Std_Func_Name: {
        enterOuterAlt(_localctx, 1);
        setState(1289);
        match(PLCSTParser::Std_Func_Name);
        break;
      }

      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        enterOuterAlt(_localctx, 2);
        setState(1290);
        derived_Func_Name();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Func_AccessContext ------------------------------------------------------------------

PLCSTParser::Func_AccessContext::Func_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Func_NameContext* PLCSTParser::Func_AccessContext::func_Name() {
  return getRuleContext<PLCSTParser::Func_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Func_AccessContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Func_AccessContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Func_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleFunc_Access;
}

void PLCSTParser::Func_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunc_Access(this);
}

void PLCSTParser::Func_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunc_Access(this);
}


std::any PLCSTParser::Func_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFunc_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Func_AccessContext* PLCSTParser::func_Access() {
  Func_AccessContext *_localctx = _tracker.createInstance<Func_AccessContext>(_ctx, getState());
  enterRule(_localctx, 218, PLCSTParser::RuleFunc_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1296);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 111, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1293);
        nestedNameSpecifier(); 
      }
      setState(1298);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 111, _ctx);
    }
    setState(1299);
    func_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Func_DeclContext ------------------------------------------------------------------

PLCSTParser::Func_DeclContext::Func_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Func_DeclContext::FUNCTION() {
  return getToken(PLCSTParser::FUNCTION, 0);
}

PLCSTParser::Derived_Func_NameContext* PLCSTParser::Func_DeclContext::derived_Func_Name() {
  return getRuleContext<PLCSTParser::Derived_Func_NameContext>(0);
}

PLCSTParser::Func_BodyContext* PLCSTParser::Func_DeclContext::func_Body() {
  return getRuleContext<PLCSTParser::Func_BodyContext>(0);
}

tree::TerminalNode* PLCSTParser::Func_DeclContext::END_FUNCTION() {
  return getToken(PLCSTParser::END_FUNCTION, 0);
}

tree::TerminalNode* PLCSTParser::Func_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Data_Type_AccessContext* PLCSTParser::Func_DeclContext::data_Type_Access() {
  return getRuleContext<PLCSTParser::Data_Type_AccessContext>(0);
}

std::vector<PLCSTParser::Using_DirectiveContext *> PLCSTParser::Func_DeclContext::using_Directive() {
  return getRuleContexts<PLCSTParser::Using_DirectiveContext>();
}

PLCSTParser::Using_DirectiveContext* PLCSTParser::Func_DeclContext::using_Directive(size_t i) {
  return getRuleContext<PLCSTParser::Using_DirectiveContext>(i);
}

std::vector<PLCSTParser::IO_Var_DeclsContext *> PLCSTParser::Func_DeclContext::iO_Var_Decls() {
  return getRuleContexts<PLCSTParser::IO_Var_DeclsContext>();
}

PLCSTParser::IO_Var_DeclsContext* PLCSTParser::Func_DeclContext::iO_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::IO_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Func_Var_DeclsContext *> PLCSTParser::Func_DeclContext::func_Var_Decls() {
  return getRuleContexts<PLCSTParser::Func_Var_DeclsContext>();
}

PLCSTParser::Func_Var_DeclsContext* PLCSTParser::Func_DeclContext::func_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Func_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Temp_Var_DeclsContext *> PLCSTParser::Func_DeclContext::temp_Var_Decls() {
  return getRuleContexts<PLCSTParser::Temp_Var_DeclsContext>();
}

PLCSTParser::Temp_Var_DeclsContext* PLCSTParser::Func_DeclContext::temp_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Temp_Var_DeclsContext>(i);
}


size_t PLCSTParser::Func_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleFunc_Decl;
}

void PLCSTParser::Func_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunc_Decl(this);
}

void PLCSTParser::Func_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunc_Decl(this);
}


std::any PLCSTParser::Func_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFunc_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Func_DeclContext* PLCSTParser::func_Decl() {
  Func_DeclContext *_localctx = _tracker.createInstance<Func_DeclContext>(_ctx, getState());
  enterRule(_localctx, 220, PLCSTParser::RuleFunc_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1301);
    match(PLCSTParser::FUNCTION);
    setState(1302);
    derived_Func_Name();
    setState(1305);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Colon) {
      setState(1303);
      match(PLCSTParser::Colon);
      setState(1304);
      data_Type_Access();
    }
    setState(1310);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::USING) {
      setState(1307);
      using_Directive();
      setState(1312);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1318);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -2589569785738035200) != 0) {
      setState(1316);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case PLCSTParser::VAR_INPUT:
        case PLCSTParser::VAR_OUTPUT:
        case PLCSTParser::VAR_IN_OUT: {
          setState(1313);
          iO_Var_Decls();
          break;
        }

        case PLCSTParser::VAR:
        case PLCSTParser::VAR_EXTERNAL: {
          setState(1314);
          func_Var_Decls();
          break;
        }

        case PLCSTParser::VAR_TEMP: {
          setState(1315);
          temp_Var_Decls();
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(1320);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1321);
    func_Body();
    setState(1322);
    match(PLCSTParser::END_FUNCTION);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IO_Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::IO_Var_DeclsContext::IO_Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Input_DeclsContext* PLCSTParser::IO_Var_DeclsContext::input_Decls() {
  return getRuleContext<PLCSTParser::Input_DeclsContext>(0);
}

PLCSTParser::Output_DeclsContext* PLCSTParser::IO_Var_DeclsContext::output_Decls() {
  return getRuleContext<PLCSTParser::Output_DeclsContext>(0);
}

PLCSTParser::In_Out_DeclsContext* PLCSTParser::IO_Var_DeclsContext::in_Out_Decls() {
  return getRuleContext<PLCSTParser::In_Out_DeclsContext>(0);
}


size_t PLCSTParser::IO_Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleIO_Var_Decls;
}

void PLCSTParser::IO_Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIO_Var_Decls(this);
}

void PLCSTParser::IO_Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIO_Var_Decls(this);
}


std::any PLCSTParser::IO_Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitIO_Var_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::IO_Var_DeclsContext* PLCSTParser::iO_Var_Decls() {
  IO_Var_DeclsContext *_localctx = _tracker.createInstance<IO_Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 222, PLCSTParser::RuleIO_Var_Decls);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1327);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::VAR_INPUT: {
        enterOuterAlt(_localctx, 1);
        setState(1324);
        input_Decls();
        break;
      }

      case PLCSTParser::VAR_OUTPUT: {
        enterOuterAlt(_localctx, 2);
        setState(1325);
        output_Decls();
        break;
      }

      case PLCSTParser::VAR_IN_OUT: {
        enterOuterAlt(_localctx, 3);
        setState(1326);
        in_Out_Decls();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Func_Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::Func_Var_DeclsContext::Func_Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::External_Var_DeclsContext* PLCSTParser::Func_Var_DeclsContext::external_Var_Decls() {
  return getRuleContext<PLCSTParser::External_Var_DeclsContext>(0);
}

PLCSTParser::Var_DeclsContext* PLCSTParser::Func_Var_DeclsContext::var_Decls() {
  return getRuleContext<PLCSTParser::Var_DeclsContext>(0);
}


size_t PLCSTParser::Func_Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleFunc_Var_Decls;
}

void PLCSTParser::Func_Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunc_Var_Decls(this);
}

void PLCSTParser::Func_Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunc_Var_Decls(this);
}


std::any PLCSTParser::Func_Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFunc_Var_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Func_Var_DeclsContext* PLCSTParser::func_Var_Decls() {
  Func_Var_DeclsContext *_localctx = _tracker.createInstance<Func_Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 224, PLCSTParser::RuleFunc_Var_Decls);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1331);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::VAR_EXTERNAL: {
        enterOuterAlt(_localctx, 1);
        setState(1329);
        external_Var_Decls();
        break;
      }

      case PLCSTParser::VAR: {
        enterOuterAlt(_localctx, 2);
        setState(1330);
        var_Decls();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Func_BodyContext ------------------------------------------------------------------

PLCSTParser::Func_BodyContext::Func_BodyContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Stmt_ListContext* PLCSTParser::Func_BodyContext::stmt_List() {
  return getRuleContext<PLCSTParser::Stmt_ListContext>(0);
}


size_t PLCSTParser::Func_BodyContext::getRuleIndex() const {
  return PLCSTParser::RuleFunc_Body;
}

void PLCSTParser::Func_BodyContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunc_Body(this);
}

void PLCSTParser::Func_BodyContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunc_Body(this);
}


std::any PLCSTParser::Func_BodyContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFunc_Body(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Func_BodyContext* PLCSTParser::func_Body() {
  Func_BodyContext *_localctx = _tracker.createInstance<Func_BodyContext>(_ctx, getState());
  enterRule(_localctx, 226, PLCSTParser::RuleFunc_Body);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1333);
    stmt_List();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_Type_NameContext ------------------------------------------------------------------

PLCSTParser::FB_Type_NameContext::FB_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::FB_Type_NameContext::Std_FB_Name() {
  return getToken(PLCSTParser::Std_FB_Name, 0);
}

PLCSTParser::Derived_FB_NameContext* PLCSTParser::FB_Type_NameContext::derived_FB_Name() {
  return getRuleContext<PLCSTParser::Derived_FB_NameContext>(0);
}


size_t PLCSTParser::FB_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Type_Name;
}

void PLCSTParser::FB_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Type_Name(this);
}

void PLCSTParser::FB_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Type_Name(this);
}


std::any PLCSTParser::FB_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_Type_NameContext* PLCSTParser::fB_Type_Name() {
  FB_Type_NameContext *_localctx = _tracker.createInstance<FB_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 228, PLCSTParser::RuleFB_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1337);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::Std_FB_Name: {
        enterOuterAlt(_localctx, 1);
        setState(1335);
        match(PLCSTParser::Std_FB_Name);
        break;
      }

      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        enterOuterAlt(_localctx, 2);
        setState(1336);
        derived_FB_Name();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_Type_AccessContext ------------------------------------------------------------------

PLCSTParser::FB_Type_AccessContext::FB_Type_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::FB_Type_NameContext* PLCSTParser::FB_Type_AccessContext::fB_Type_Name() {
  return getRuleContext<PLCSTParser::FB_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::FB_Type_AccessContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::FB_Type_AccessContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::FB_Type_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Type_Access;
}

void PLCSTParser::FB_Type_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Type_Access(this);
}

void PLCSTParser::FB_Type_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Type_Access(this);
}


std::any PLCSTParser::FB_Type_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Type_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_Type_AccessContext* PLCSTParser::fB_Type_Access() {
  FB_Type_AccessContext *_localctx = _tracker.createInstance<FB_Type_AccessContext>(_ctx, getState());
  enterRule(_localctx, 230, PLCSTParser::RuleFB_Type_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1342);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 119, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1339);
        nestedNameSpecifier(); 
      }
      setState(1344);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 119, _ctx);
    }
    setState(1345);
    fB_Type_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_DeclContext ------------------------------------------------------------------

PLCSTParser::FB_DeclContext::FB_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::FB_DeclContext::FUNCTION_BLOCK() {
  return getToken(PLCSTParser::FUNCTION_BLOCK, 0);
}

PLCSTParser::Derived_FB_NameContext* PLCSTParser::FB_DeclContext::derived_FB_Name() {
  return getRuleContext<PLCSTParser::Derived_FB_NameContext>(0);
}

PLCSTParser::FB_BodyContext* PLCSTParser::FB_DeclContext::fB_Body() {
  return getRuleContext<PLCSTParser::FB_BodyContext>(0);
}

tree::TerminalNode* PLCSTParser::FB_DeclContext::END_FUNCTION_BLOCK() {
  return getToken(PLCSTParser::END_FUNCTION_BLOCK, 0);
}

std::vector<PLCSTParser::Using_DirectiveContext *> PLCSTParser::FB_DeclContext::using_Directive() {
  return getRuleContexts<PLCSTParser::Using_DirectiveContext>();
}

PLCSTParser::Using_DirectiveContext* PLCSTParser::FB_DeclContext::using_Directive(size_t i) {
  return getRuleContext<PLCSTParser::Using_DirectiveContext>(i);
}

tree::TerminalNode* PLCSTParser::FB_DeclContext::EXTENDS() {
  return getToken(PLCSTParser::EXTENDS, 0);
}

tree::TerminalNode* PLCSTParser::FB_DeclContext::IMPLEMENTS() {
  return getToken(PLCSTParser::IMPLEMENTS, 0);
}

PLCSTParser::Interface_Name_ListContext* PLCSTParser::FB_DeclContext::interface_Name_List() {
  return getRuleContext<PLCSTParser::Interface_Name_ListContext>(0);
}

std::vector<PLCSTParser::FB_IO_Var_DeclsContext *> PLCSTParser::FB_DeclContext::fB_IO_Var_Decls() {
  return getRuleContexts<PLCSTParser::FB_IO_Var_DeclsContext>();
}

PLCSTParser::FB_IO_Var_DeclsContext* PLCSTParser::FB_DeclContext::fB_IO_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::FB_IO_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Func_Var_DeclsContext *> PLCSTParser::FB_DeclContext::func_Var_Decls() {
  return getRuleContexts<PLCSTParser::Func_Var_DeclsContext>();
}

PLCSTParser::Func_Var_DeclsContext* PLCSTParser::FB_DeclContext::func_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Func_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Temp_Var_DeclsContext *> PLCSTParser::FB_DeclContext::temp_Var_Decls() {
  return getRuleContexts<PLCSTParser::Temp_Var_DeclsContext>();
}

PLCSTParser::Temp_Var_DeclsContext* PLCSTParser::FB_DeclContext::temp_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Temp_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Other_Var_DeclsContext *> PLCSTParser::FB_DeclContext::other_Var_Decls() {
  return getRuleContexts<PLCSTParser::Other_Var_DeclsContext>();
}

PLCSTParser::Other_Var_DeclsContext* PLCSTParser::FB_DeclContext::other_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Other_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Method_DeclContext *> PLCSTParser::FB_DeclContext::method_Decl() {
  return getRuleContexts<PLCSTParser::Method_DeclContext>();
}

PLCSTParser::Method_DeclContext* PLCSTParser::FB_DeclContext::method_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Method_DeclContext>(i);
}

tree::TerminalNode* PLCSTParser::FB_DeclContext::FINAL() {
  return getToken(PLCSTParser::FINAL, 0);
}

tree::TerminalNode* PLCSTParser::FB_DeclContext::ABSTRACT() {
  return getToken(PLCSTParser::ABSTRACT, 0);
}

PLCSTParser::FB_Type_AccessContext* PLCSTParser::FB_DeclContext::fB_Type_Access() {
  return getRuleContext<PLCSTParser::FB_Type_AccessContext>(0);
}

PLCSTParser::Class_Type_AccessContext* PLCSTParser::FB_DeclContext::class_Type_Access() {
  return getRuleContext<PLCSTParser::Class_Type_AccessContext>(0);
}


size_t PLCSTParser::FB_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Decl;
}

void PLCSTParser::FB_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Decl(this);
}

void PLCSTParser::FB_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Decl(this);
}


std::any PLCSTParser::FB_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_DeclContext* PLCSTParser::fB_Decl() {
  FB_DeclContext *_localctx = _tracker.createInstance<FB_DeclContext>(_ctx, getState());
  enterRule(_localctx, 232, PLCSTParser::RuleFB_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1347);
    match(PLCSTParser::FUNCTION_BLOCK);
    setState(1349);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::FINAL

    || _la == PLCSTParser::ABSTRACT) {
      setState(1348);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::FINAL

      || _la == PLCSTParser::ABSTRACT)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1351);
    derived_FB_Name();
    setState(1355);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::USING) {
      setState(1352);
      using_Directive();
      setState(1357);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1363);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::EXTENDS) {
      setState(1358);
      match(PLCSTParser::EXTENDS);
      setState(1361);
      _errHandler->sync(this);
      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 122, _ctx)) {
      case 1: {
        setState(1359);
        fB_Type_Access();
        break;
      }

      case 2: {
        setState(1360);
        class_Type_Access();
        break;
      }

      default:
        break;
      }
    }
    setState(1367);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::IMPLEMENTS) {
      setState(1365);
      match(PLCSTParser::IMPLEMENTS);
      setState(1366);
      interface_Name_List();
    }
    setState(1375);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -2589569785738035200) != 0) {
      setState(1373);
      _errHandler->sync(this);
      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 125, _ctx)) {
      case 1: {
        setState(1369);
        fB_IO_Var_Decls();
        break;
      }

      case 2: {
        setState(1370);
        func_Var_Decls();
        break;
      }

      case 3: {
        setState(1371);
        temp_Var_Decls();
        break;
      }

      case 4: {
        setState(1372);
        other_Var_Decls();
        break;
      }

      default:
        break;
      }
      setState(1377);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1381);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::METHOD) {
      setState(1378);
      method_Decl();
      setState(1383);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1384);
    fB_Body();
    setState(1385);
    match(PLCSTParser::END_FUNCTION_BLOCK);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_IO_Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::FB_IO_Var_DeclsContext::FB_IO_Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::FB_Input_DeclsContext* PLCSTParser::FB_IO_Var_DeclsContext::fB_Input_Decls() {
  return getRuleContext<PLCSTParser::FB_Input_DeclsContext>(0);
}

PLCSTParser::FB_Output_DeclsContext* PLCSTParser::FB_IO_Var_DeclsContext::fB_Output_Decls() {
  return getRuleContext<PLCSTParser::FB_Output_DeclsContext>(0);
}

PLCSTParser::In_Out_DeclsContext* PLCSTParser::FB_IO_Var_DeclsContext::in_Out_Decls() {
  return getRuleContext<PLCSTParser::In_Out_DeclsContext>(0);
}


size_t PLCSTParser::FB_IO_Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_IO_Var_Decls;
}

void PLCSTParser::FB_IO_Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_IO_Var_Decls(this);
}

void PLCSTParser::FB_IO_Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_IO_Var_Decls(this);
}


std::any PLCSTParser::FB_IO_Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_IO_Var_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_IO_Var_DeclsContext* PLCSTParser::fB_IO_Var_Decls() {
  FB_IO_Var_DeclsContext *_localctx = _tracker.createInstance<FB_IO_Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 234, PLCSTParser::RuleFB_IO_Var_Decls);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1390);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::VAR_INPUT: {
        enterOuterAlt(_localctx, 1);
        setState(1387);
        fB_Input_Decls();
        break;
      }

      case PLCSTParser::VAR_OUTPUT: {
        enterOuterAlt(_localctx, 2);
        setState(1388);
        fB_Output_Decls();
        break;
      }

      case PLCSTParser::VAR_IN_OUT: {
        enterOuterAlt(_localctx, 3);
        setState(1389);
        in_Out_Decls();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_Input_DeclsContext ------------------------------------------------------------------

PLCSTParser::FB_Input_DeclsContext::FB_Input_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::FB_Input_DeclsContext::VAR_INPUT() {
  return getToken(PLCSTParser::VAR_INPUT, 0);
}

tree::TerminalNode* PLCSTParser::FB_Input_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::FB_Input_DeclContext *> PLCSTParser::FB_Input_DeclsContext::fB_Input_Decl() {
  return getRuleContexts<PLCSTParser::FB_Input_DeclContext>();
}

PLCSTParser::FB_Input_DeclContext* PLCSTParser::FB_Input_DeclsContext::fB_Input_Decl(size_t i) {
  return getRuleContext<PLCSTParser::FB_Input_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::FB_Input_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::FB_Input_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}

tree::TerminalNode* PLCSTParser::FB_Input_DeclsContext::RETAIN() {
  return getToken(PLCSTParser::RETAIN, 0);
}

tree::TerminalNode* PLCSTParser::FB_Input_DeclsContext::NON_RETAIN() {
  return getToken(PLCSTParser::NON_RETAIN, 0);
}


size_t PLCSTParser::FB_Input_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Input_Decls;
}

void PLCSTParser::FB_Input_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Input_Decls(this);
}

void PLCSTParser::FB_Input_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Input_Decls(this);
}


std::any PLCSTParser::FB_Input_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Input_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_Input_DeclsContext* PLCSTParser::fB_Input_Decls() {
  FB_Input_DeclsContext *_localctx = _tracker.createInstance<FB_Input_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 236, PLCSTParser::RuleFB_Input_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1392);
    match(PLCSTParser::VAR_INPUT);
    setState(1394);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::RETAIN

    || _la == PLCSTParser::NON_RETAIN) {
      setState(1393);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::RETAIN

      || _la == PLCSTParser::NON_RETAIN)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1401);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1396);
      fB_Input_Decl();
      setState(1397);
      match(PLCSTParser::Semi);
      setState(1403);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1404);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_Input_DeclContext ------------------------------------------------------------------

PLCSTParser::FB_Input_DeclContext::FB_Input_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Var_Decl_InitContext* PLCSTParser::FB_Input_DeclContext::var_Decl_Init() {
  return getRuleContext<PLCSTParser::Var_Decl_InitContext>(0);
}

PLCSTParser::Edge_DeclContext* PLCSTParser::FB_Input_DeclContext::edge_Decl() {
  return getRuleContext<PLCSTParser::Edge_DeclContext>(0);
}

PLCSTParser::Array_Conform_DeclContext* PLCSTParser::FB_Input_DeclContext::array_Conform_Decl() {
  return getRuleContext<PLCSTParser::Array_Conform_DeclContext>(0);
}


size_t PLCSTParser::FB_Input_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Input_Decl;
}

void PLCSTParser::FB_Input_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Input_Decl(this);
}

void PLCSTParser::FB_Input_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Input_Decl(this);
}


std::any PLCSTParser::FB_Input_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Input_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_Input_DeclContext* PLCSTParser::fB_Input_Decl() {
  FB_Input_DeclContext *_localctx = _tracker.createInstance<FB_Input_DeclContext>(_ctx, getState());
  enterRule(_localctx, 238, PLCSTParser::RuleFB_Input_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1409);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 131, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1406);
      var_Decl_Init();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1407);
      edge_Decl();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(1408);
      array_Conform_Decl();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_Output_DeclsContext ------------------------------------------------------------------

PLCSTParser::FB_Output_DeclsContext::FB_Output_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::FB_Output_DeclsContext::VAR_OUTPUT() {
  return getToken(PLCSTParser::VAR_OUTPUT, 0);
}

tree::TerminalNode* PLCSTParser::FB_Output_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::FB_Output_DeclContext *> PLCSTParser::FB_Output_DeclsContext::fB_Output_Decl() {
  return getRuleContexts<PLCSTParser::FB_Output_DeclContext>();
}

PLCSTParser::FB_Output_DeclContext* PLCSTParser::FB_Output_DeclsContext::fB_Output_Decl(size_t i) {
  return getRuleContext<PLCSTParser::FB_Output_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::FB_Output_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::FB_Output_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}

tree::TerminalNode* PLCSTParser::FB_Output_DeclsContext::RETAIN() {
  return getToken(PLCSTParser::RETAIN, 0);
}

tree::TerminalNode* PLCSTParser::FB_Output_DeclsContext::NON_RETAIN() {
  return getToken(PLCSTParser::NON_RETAIN, 0);
}


size_t PLCSTParser::FB_Output_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Output_Decls;
}

void PLCSTParser::FB_Output_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Output_Decls(this);
}

void PLCSTParser::FB_Output_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Output_Decls(this);
}


std::any PLCSTParser::FB_Output_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Output_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_Output_DeclsContext* PLCSTParser::fB_Output_Decls() {
  FB_Output_DeclsContext *_localctx = _tracker.createInstance<FB_Output_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 240, PLCSTParser::RuleFB_Output_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1411);
    match(PLCSTParser::VAR_OUTPUT);
    setState(1413);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::RETAIN

    || _la == PLCSTParser::NON_RETAIN) {
      setState(1412);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::RETAIN

      || _la == PLCSTParser::NON_RETAIN)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1420);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1415);
      fB_Output_Decl();
      setState(1416);
      match(PLCSTParser::Semi);
      setState(1422);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1423);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_Output_DeclContext ------------------------------------------------------------------

PLCSTParser::FB_Output_DeclContext::FB_Output_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Var_Decl_InitContext* PLCSTParser::FB_Output_DeclContext::var_Decl_Init() {
  return getRuleContext<PLCSTParser::Var_Decl_InitContext>(0);
}

PLCSTParser::Array_Conform_DeclContext* PLCSTParser::FB_Output_DeclContext::array_Conform_Decl() {
  return getRuleContext<PLCSTParser::Array_Conform_DeclContext>(0);
}


size_t PLCSTParser::FB_Output_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Output_Decl;
}

void PLCSTParser::FB_Output_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Output_Decl(this);
}

void PLCSTParser::FB_Output_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Output_Decl(this);
}


std::any PLCSTParser::FB_Output_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Output_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_Output_DeclContext* PLCSTParser::fB_Output_Decl() {
  FB_Output_DeclContext *_localctx = _tracker.createInstance<FB_Output_DeclContext>(_ctx, getState());
  enterRule(_localctx, 242, PLCSTParser::RuleFB_Output_Decl);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1427);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 134, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1425);
      var_Decl_Init();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1426);
      array_Conform_Decl();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Other_Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::Other_Var_DeclsContext::Other_Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Retain_Var_DeclsContext* PLCSTParser::Other_Var_DeclsContext::retain_Var_Decls() {
  return getRuleContext<PLCSTParser::Retain_Var_DeclsContext>(0);
}

PLCSTParser::No_Retain_Var_DeclsContext* PLCSTParser::Other_Var_DeclsContext::no_Retain_Var_Decls() {
  return getRuleContext<PLCSTParser::No_Retain_Var_DeclsContext>(0);
}

PLCSTParser::Loc_Partly_Var_DeclContext* PLCSTParser::Other_Var_DeclsContext::loc_Partly_Var_Decl() {
  return getRuleContext<PLCSTParser::Loc_Partly_Var_DeclContext>(0);
}


size_t PLCSTParser::Other_Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleOther_Var_Decls;
}

void PLCSTParser::Other_Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterOther_Var_Decls(this);
}

void PLCSTParser::Other_Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitOther_Var_Decls(this);
}


std::any PLCSTParser::Other_Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitOther_Var_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Other_Var_DeclsContext* PLCSTParser::other_Var_Decls() {
  Other_Var_DeclsContext *_localctx = _tracker.createInstance<Other_Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 244, PLCSTParser::RuleOther_Var_Decls);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1432);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 135, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1429);
      retain_Var_Decls();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1430);
      no_Retain_Var_Decls();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(1431);
      loc_Partly_Var_Decl();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- No_Retain_Var_DeclsContext ------------------------------------------------------------------

PLCSTParser::No_Retain_Var_DeclsContext::No_Retain_Var_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::No_Retain_Var_DeclsContext::VAR() {
  return getToken(PLCSTParser::VAR, 0);
}

tree::TerminalNode* PLCSTParser::No_Retain_Var_DeclsContext::NON_RETAIN() {
  return getToken(PLCSTParser::NON_RETAIN, 0);
}

tree::TerminalNode* PLCSTParser::No_Retain_Var_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

PLCSTParser::Access_SpecContext* PLCSTParser::No_Retain_Var_DeclsContext::access_Spec() {
  return getRuleContext<PLCSTParser::Access_SpecContext>(0);
}

std::vector<PLCSTParser::Var_Decl_InitContext *> PLCSTParser::No_Retain_Var_DeclsContext::var_Decl_Init() {
  return getRuleContexts<PLCSTParser::Var_Decl_InitContext>();
}

PLCSTParser::Var_Decl_InitContext* PLCSTParser::No_Retain_Var_DeclsContext::var_Decl_Init(size_t i) {
  return getRuleContext<PLCSTParser::Var_Decl_InitContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::No_Retain_Var_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::No_Retain_Var_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::No_Retain_Var_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleNo_Retain_Var_Decls;
}

void PLCSTParser::No_Retain_Var_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNo_Retain_Var_Decls(this);
}

void PLCSTParser::No_Retain_Var_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNo_Retain_Var_Decls(this);
}


std::any PLCSTParser::No_Retain_Var_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNo_Retain_Var_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::No_Retain_Var_DeclsContext* PLCSTParser::no_Retain_Var_Decls() {
  No_Retain_Var_DeclsContext *_localctx = _tracker.createInstance<No_Retain_Var_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 246, PLCSTParser::RuleNo_Retain_Var_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1434);
    match(PLCSTParser::VAR);
    setState(1435);
    match(PLCSTParser::NON_RETAIN);
    setState(1437);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la - 86) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 86)) & 536870919) != 0) {
      setState(1436);
      access_Spec();
    }
    setState(1444);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1439);
      var_Decl_Init();
      setState(1440);
      match(PLCSTParser::Semi);
      setState(1446);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1447);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_BodyContext ------------------------------------------------------------------

PLCSTParser::FB_BodyContext::FB_BodyContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Stmt_ListContext* PLCSTParser::FB_BodyContext::stmt_List() {
  return getRuleContext<PLCSTParser::Stmt_ListContext>(0);
}


size_t PLCSTParser::FB_BodyContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Body;
}

void PLCSTParser::FB_BodyContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Body(this);
}

void PLCSTParser::FB_BodyContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Body(this);
}


std::any PLCSTParser::FB_BodyContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Body(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_BodyContext* PLCSTParser::fB_Body() {
  FB_BodyContext *_localctx = _tracker.createInstance<FB_BodyContext>(_ctx, getState());
  enterRule(_localctx, 248, PLCSTParser::RuleFB_Body);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1449);
    stmt_List();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Method_DeclContext ------------------------------------------------------------------

PLCSTParser::Method_DeclContext::Method_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Method_DeclContext::METHOD() {
  return getToken(PLCSTParser::METHOD, 0);
}

PLCSTParser::Access_SpecContext* PLCSTParser::Method_DeclContext::access_Spec() {
  return getRuleContext<PLCSTParser::Access_SpecContext>(0);
}

PLCSTParser::Method_NameContext* PLCSTParser::Method_DeclContext::method_Name() {
  return getRuleContext<PLCSTParser::Method_NameContext>(0);
}

PLCSTParser::Func_BodyContext* PLCSTParser::Method_DeclContext::func_Body() {
  return getRuleContext<PLCSTParser::Func_BodyContext>(0);
}

tree::TerminalNode* PLCSTParser::Method_DeclContext::END_METHOD() {
  return getToken(PLCSTParser::END_METHOD, 0);
}

tree::TerminalNode* PLCSTParser::Method_DeclContext::OVERRIDE() {
  return getToken(PLCSTParser::OVERRIDE, 0);
}

tree::TerminalNode* PLCSTParser::Method_DeclContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Data_Type_AccessContext* PLCSTParser::Method_DeclContext::data_Type_Access() {
  return getRuleContext<PLCSTParser::Data_Type_AccessContext>(0);
}

std::vector<PLCSTParser::IO_Var_DeclsContext *> PLCSTParser::Method_DeclContext::iO_Var_Decls() {
  return getRuleContexts<PLCSTParser::IO_Var_DeclsContext>();
}

PLCSTParser::IO_Var_DeclsContext* PLCSTParser::Method_DeclContext::iO_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::IO_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Func_Var_DeclsContext *> PLCSTParser::Method_DeclContext::func_Var_Decls() {
  return getRuleContexts<PLCSTParser::Func_Var_DeclsContext>();
}

PLCSTParser::Func_Var_DeclsContext* PLCSTParser::Method_DeclContext::func_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Func_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Temp_Var_DeclsContext *> PLCSTParser::Method_DeclContext::temp_Var_Decls() {
  return getRuleContexts<PLCSTParser::Temp_Var_DeclsContext>();
}

PLCSTParser::Temp_Var_DeclsContext* PLCSTParser::Method_DeclContext::temp_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Temp_Var_DeclsContext>(i);
}

tree::TerminalNode* PLCSTParser::Method_DeclContext::FINAL() {
  return getToken(PLCSTParser::FINAL, 0);
}

tree::TerminalNode* PLCSTParser::Method_DeclContext::ABSTRACT() {
  return getToken(PLCSTParser::ABSTRACT, 0);
}


size_t PLCSTParser::Method_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleMethod_Decl;
}

void PLCSTParser::Method_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMethod_Decl(this);
}

void PLCSTParser::Method_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMethod_Decl(this);
}


std::any PLCSTParser::Method_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitMethod_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Method_DeclContext* PLCSTParser::method_Decl() {
  Method_DeclContext *_localctx = _tracker.createInstance<Method_DeclContext>(_ctx, getState());
  enterRule(_localctx, 250, PLCSTParser::RuleMethod_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1451);
    match(PLCSTParser::METHOD);
    setState(1452);
    access_Spec();
    setState(1454);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::FINAL

    || _la == PLCSTParser::ABSTRACT) {
      setState(1453);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::FINAL

      || _la == PLCSTParser::ABSTRACT)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1457);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::OVERRIDE) {
      setState(1456);
      match(PLCSTParser::OVERRIDE);
    }
    setState(1459);
    method_Name();
    setState(1462);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Colon) {
      setState(1460);
      match(PLCSTParser::Colon);
      setState(1461);
      data_Type_Access();
    }
    setState(1469);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -2589569785738035200) != 0) {
      setState(1467);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case PLCSTParser::VAR_INPUT:
        case PLCSTParser::VAR_OUTPUT:
        case PLCSTParser::VAR_IN_OUT: {
          setState(1464);
          iO_Var_Decls();
          break;
        }

        case PLCSTParser::VAR:
        case PLCSTParser::VAR_EXTERNAL: {
          setState(1465);
          func_Var_Decls();
          break;
        }

        case PLCSTParser::VAR_TEMP: {
          setState(1466);
          temp_Var_Decls();
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(1471);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1472);
    func_Body();
    setState(1473);
    match(PLCSTParser::END_METHOD);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Access_SpecContext ------------------------------------------------------------------

PLCSTParser::Access_SpecContext::Access_SpecContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Access_SpecContext::PUBLIC() {
  return getToken(PLCSTParser::PUBLIC, 0);
}

tree::TerminalNode* PLCSTParser::Access_SpecContext::PROTECTED() {
  return getToken(PLCSTParser::PROTECTED, 0);
}

tree::TerminalNode* PLCSTParser::Access_SpecContext::PRIVATE() {
  return getToken(PLCSTParser::PRIVATE, 0);
}

tree::TerminalNode* PLCSTParser::Access_SpecContext::INTERNAL() {
  return getToken(PLCSTParser::INTERNAL, 0);
}


size_t PLCSTParser::Access_SpecContext::getRuleIndex() const {
  return PLCSTParser::RuleAccess_Spec;
}

void PLCSTParser::Access_SpecContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAccess_Spec(this);
}

void PLCSTParser::Access_SpecContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAccess_Spec(this);
}


std::any PLCSTParser::Access_SpecContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAccess_Spec(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Access_SpecContext* PLCSTParser::access_Spec() {
  Access_SpecContext *_localctx = _tracker.createInstance<Access_SpecContext>(_ctx, getState());
  enterRule(_localctx, 252, PLCSTParser::RuleAccess_Spec);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1475);
    _la = _input->LA(1);
    if (!((((_la - 86) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 86)) & 536870919) != 0)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Class_DeclContext ------------------------------------------------------------------

PLCSTParser::Class_DeclContext::Class_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Class_DeclContext::CLASS() {
  return getToken(PLCSTParser::CLASS, 0);
}

PLCSTParser::Class_Type_NameContext* PLCSTParser::Class_DeclContext::class_Type_Name() {
  return getRuleContext<PLCSTParser::Class_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Class_DeclContext::END_CLASS() {
  return getToken(PLCSTParser::END_CLASS, 0);
}

std::vector<PLCSTParser::Using_DirectiveContext *> PLCSTParser::Class_DeclContext::using_Directive() {
  return getRuleContexts<PLCSTParser::Using_DirectiveContext>();
}

PLCSTParser::Using_DirectiveContext* PLCSTParser::Class_DeclContext::using_Directive(size_t i) {
  return getRuleContext<PLCSTParser::Using_DirectiveContext>(i);
}

tree::TerminalNode* PLCSTParser::Class_DeclContext::EXTENDS() {
  return getToken(PLCSTParser::EXTENDS, 0);
}

PLCSTParser::Class_Type_AccessContext* PLCSTParser::Class_DeclContext::class_Type_Access() {
  return getRuleContext<PLCSTParser::Class_Type_AccessContext>(0);
}

tree::TerminalNode* PLCSTParser::Class_DeclContext::IMPLEMENTS() {
  return getToken(PLCSTParser::IMPLEMENTS, 0);
}

PLCSTParser::Interface_Name_ListContext* PLCSTParser::Class_DeclContext::interface_Name_List() {
  return getRuleContext<PLCSTParser::Interface_Name_ListContext>(0);
}

std::vector<PLCSTParser::Func_Var_DeclsContext *> PLCSTParser::Class_DeclContext::func_Var_Decls() {
  return getRuleContexts<PLCSTParser::Func_Var_DeclsContext>();
}

PLCSTParser::Func_Var_DeclsContext* PLCSTParser::Class_DeclContext::func_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Func_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Other_Var_DeclsContext *> PLCSTParser::Class_DeclContext::other_Var_Decls() {
  return getRuleContexts<PLCSTParser::Other_Var_DeclsContext>();
}

PLCSTParser::Other_Var_DeclsContext* PLCSTParser::Class_DeclContext::other_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Other_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Method_DeclContext *> PLCSTParser::Class_DeclContext::method_Decl() {
  return getRuleContexts<PLCSTParser::Method_DeclContext>();
}

PLCSTParser::Method_DeclContext* PLCSTParser::Class_DeclContext::method_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Method_DeclContext>(i);
}

tree::TerminalNode* PLCSTParser::Class_DeclContext::FINAL() {
  return getToken(PLCSTParser::FINAL, 0);
}

tree::TerminalNode* PLCSTParser::Class_DeclContext::ABSTRACT() {
  return getToken(PLCSTParser::ABSTRACT, 0);
}


size_t PLCSTParser::Class_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleClass_Decl;
}

void PLCSTParser::Class_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterClass_Decl(this);
}

void PLCSTParser::Class_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitClass_Decl(this);
}


std::any PLCSTParser::Class_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitClass_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Class_DeclContext* PLCSTParser::class_Decl() {
  Class_DeclContext *_localctx = _tracker.createInstance<Class_DeclContext>(_ctx, getState());
  enterRule(_localctx, 254, PLCSTParser::RuleClass_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1477);
    match(PLCSTParser::CLASS);
    setState(1479);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::FINAL

    || _la == PLCSTParser::ABSTRACT) {
      setState(1478);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::FINAL

      || _la == PLCSTParser::ABSTRACT)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1481);
    class_Type_Name();
    setState(1485);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::USING) {
      setState(1482);
      using_Directive();
      setState(1487);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1490);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::EXTENDS) {
      setState(1488);
      match(PLCSTParser::EXTENDS);
      setState(1489);
      class_Type_Access();
    }
    setState(1494);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::IMPLEMENTS) {
      setState(1492);
      match(PLCSTParser::IMPLEMENTS);
      setState(1493);
      interface_Name_List();
    }
    setState(1500);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::VAR

    || _la == PLCSTParser::VAR_EXTERNAL) {
      setState(1498);
      _errHandler->sync(this);
      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 147, _ctx)) {
      case 1: {
        setState(1496);
        func_Var_Decls();
        break;
      }

      case 2: {
        setState(1497);
        other_Var_Decls();
        break;
      }

      default:
        break;
      }
      setState(1502);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1506);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::METHOD) {
      setState(1503);
      method_Decl();
      setState(1508);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1509);
    match(PLCSTParser::END_CLASS);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Class_Type_AccessContext ------------------------------------------------------------------

PLCSTParser::Class_Type_AccessContext::Class_Type_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Class_Type_NameContext* PLCSTParser::Class_Type_AccessContext::class_Type_Name() {
  return getRuleContext<PLCSTParser::Class_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Class_Type_AccessContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Class_Type_AccessContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Class_Type_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleClass_Type_Access;
}

void PLCSTParser::Class_Type_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterClass_Type_Access(this);
}

void PLCSTParser::Class_Type_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitClass_Type_Access(this);
}


std::any PLCSTParser::Class_Type_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitClass_Type_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Class_Type_AccessContext* PLCSTParser::class_Type_Access() {
  Class_Type_AccessContext *_localctx = _tracker.createInstance<Class_Type_AccessContext>(_ctx, getState());
  enterRule(_localctx, 256, PLCSTParser::RuleClass_Type_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1514);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 150, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1511);
        nestedNameSpecifier(); 
      }
      setState(1516);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 150, _ctx);
    }
    setState(1517);
    class_Type_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Class_Instance_NameContext ------------------------------------------------------------------

PLCSTParser::Class_Instance_NameContext::Class_Instance_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Class_NameContext* PLCSTParser::Class_Instance_NameContext::class_Name() {
  return getRuleContext<PLCSTParser::Class_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Class_Instance_NameContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Class_Instance_NameContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Class_Instance_NameContext::Caret() {
  return getTokens(PLCSTParser::Caret);
}

tree::TerminalNode* PLCSTParser::Class_Instance_NameContext::Caret(size_t i) {
  return getToken(PLCSTParser::Caret, i);
}


size_t PLCSTParser::Class_Instance_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleClass_Instance_Name;
}

void PLCSTParser::Class_Instance_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterClass_Instance_Name(this);
}

void PLCSTParser::Class_Instance_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitClass_Instance_Name(this);
}


std::any PLCSTParser::Class_Instance_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitClass_Instance_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Class_Instance_NameContext* PLCSTParser::class_Instance_Name() {
  Class_Instance_NameContext *_localctx = _tracker.createInstance<Class_Instance_NameContext>(_ctx, getState());
  enterRule(_localctx, 258, PLCSTParser::RuleClass_Instance_Name);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1522);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 151, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1519);
        nestedNameSpecifier(); 
      }
      setState(1524);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 151, _ctx);
    }
    setState(1525);
    class_Name();
    setState(1529);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Caret) {
      setState(1526);
      match(PLCSTParser::Caret);
      setState(1531);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Interface_DeclContext ------------------------------------------------------------------

PLCSTParser::Interface_DeclContext::Interface_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Interface_DeclContext::INTERFACE() {
  return getToken(PLCSTParser::INTERFACE, 0);
}

PLCSTParser::Interface_Type_NameContext* PLCSTParser::Interface_DeclContext::interface_Type_Name() {
  return getRuleContext<PLCSTParser::Interface_Type_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Interface_DeclContext::END_INTERFACE() {
  return getToken(PLCSTParser::END_INTERFACE, 0);
}

std::vector<PLCSTParser::Using_DirectiveContext *> PLCSTParser::Interface_DeclContext::using_Directive() {
  return getRuleContexts<PLCSTParser::Using_DirectiveContext>();
}

PLCSTParser::Using_DirectiveContext* PLCSTParser::Interface_DeclContext::using_Directive(size_t i) {
  return getRuleContext<PLCSTParser::Using_DirectiveContext>(i);
}

tree::TerminalNode* PLCSTParser::Interface_DeclContext::EXTENDS() {
  return getToken(PLCSTParser::EXTENDS, 0);
}

PLCSTParser::Interface_Name_ListContext* PLCSTParser::Interface_DeclContext::interface_Name_List() {
  return getRuleContext<PLCSTParser::Interface_Name_ListContext>(0);
}

std::vector<PLCSTParser::Method_PrototypeContext *> PLCSTParser::Interface_DeclContext::method_Prototype() {
  return getRuleContexts<PLCSTParser::Method_PrototypeContext>();
}

PLCSTParser::Method_PrototypeContext* PLCSTParser::Interface_DeclContext::method_Prototype(size_t i) {
  return getRuleContext<PLCSTParser::Method_PrototypeContext>(i);
}


size_t PLCSTParser::Interface_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleInterface_Decl;
}

void PLCSTParser::Interface_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInterface_Decl(this);
}

void PLCSTParser::Interface_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInterface_Decl(this);
}


std::any PLCSTParser::Interface_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInterface_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Interface_DeclContext* PLCSTParser::interface_Decl() {
  Interface_DeclContext *_localctx = _tracker.createInstance<Interface_DeclContext>(_ctx, getState());
  enterRule(_localctx, 260, PLCSTParser::RuleInterface_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1532);
    match(PLCSTParser::INTERFACE);
    setState(1533);
    interface_Type_Name();
    setState(1537);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::USING) {
      setState(1534);
      using_Directive();
      setState(1539);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1542);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::EXTENDS) {
      setState(1540);
      match(PLCSTParser::EXTENDS);
      setState(1541);
      interface_Name_List();
    }
    setState(1547);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::METHOD) {
      setState(1544);
      method_Prototype();
      setState(1549);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1550);
    match(PLCSTParser::END_INTERFACE);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Method_PrototypeContext ------------------------------------------------------------------

PLCSTParser::Method_PrototypeContext::Method_PrototypeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Method_PrototypeContext::METHOD() {
  return getToken(PLCSTParser::METHOD, 0);
}

PLCSTParser::Method_NameContext* PLCSTParser::Method_PrototypeContext::method_Name() {
  return getRuleContext<PLCSTParser::Method_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Method_PrototypeContext::END_METHOD() {
  return getToken(PLCSTParser::END_METHOD, 0);
}

tree::TerminalNode* PLCSTParser::Method_PrototypeContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Data_Type_AccessContext* PLCSTParser::Method_PrototypeContext::data_Type_Access() {
  return getRuleContext<PLCSTParser::Data_Type_AccessContext>(0);
}

std::vector<PLCSTParser::IO_Var_DeclsContext *> PLCSTParser::Method_PrototypeContext::iO_Var_Decls() {
  return getRuleContexts<PLCSTParser::IO_Var_DeclsContext>();
}

PLCSTParser::IO_Var_DeclsContext* PLCSTParser::Method_PrototypeContext::iO_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::IO_Var_DeclsContext>(i);
}


size_t PLCSTParser::Method_PrototypeContext::getRuleIndex() const {
  return PLCSTParser::RuleMethod_Prototype;
}

void PLCSTParser::Method_PrototypeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMethod_Prototype(this);
}

void PLCSTParser::Method_PrototypeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMethod_Prototype(this);
}


std::any PLCSTParser::Method_PrototypeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitMethod_Prototype(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Method_PrototypeContext* PLCSTParser::method_Prototype() {
  Method_PrototypeContext *_localctx = _tracker.createInstance<Method_PrototypeContext>(_ctx, getState());
  enterRule(_localctx, 262, PLCSTParser::RuleMethod_Prototype);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1552);
    match(PLCSTParser::METHOD);
    setState(1553);
    method_Name();
    setState(1556);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Colon) {
      setState(1554);
      match(PLCSTParser::Colon);
      setState(1555);
      data_Type_Access();
    }
    setState(1561);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 869194728082505728) != 0) {
      setState(1558);
      iO_Var_Decls();
      setState(1563);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1564);
    match(PLCSTParser::END_METHOD);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Interface_Spec_InitContext ------------------------------------------------------------------

PLCSTParser::Interface_Spec_InitContext::Interface_Spec_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_ListContext* PLCSTParser::Interface_Spec_InitContext::variable_List() {
  return getRuleContext<PLCSTParser::Variable_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Interface_Spec_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Interface_ValueContext* PLCSTParser::Interface_Spec_InitContext::interface_Value() {
  return getRuleContext<PLCSTParser::Interface_ValueContext>(0);
}


size_t PLCSTParser::Interface_Spec_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleInterface_Spec_Init;
}

void PLCSTParser::Interface_Spec_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInterface_Spec_Init(this);
}

void PLCSTParser::Interface_Spec_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInterface_Spec_Init(this);
}


std::any PLCSTParser::Interface_Spec_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInterface_Spec_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Interface_Spec_InitContext* PLCSTParser::interface_Spec_Init() {
  Interface_Spec_InitContext *_localctx = _tracker.createInstance<Interface_Spec_InitContext>(_ctx, getState());
  enterRule(_localctx, 264, PLCSTParser::RuleInterface_Spec_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1566);
    variable_List();
    setState(1569);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Assign) {
      setState(1567);
      match(PLCSTParser::Assign);
      setState(1568);
      interface_Value();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Interface_ValueContext ------------------------------------------------------------------

PLCSTParser::Interface_ValueContext::Interface_ValueContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Symbolic_VariableContext* PLCSTParser::Interface_ValueContext::symbolic_Variable() {
  return getRuleContext<PLCSTParser::Symbolic_VariableContext>(0);
}

PLCSTParser::FB_Instance_NameContext* PLCSTParser::Interface_ValueContext::fB_Instance_Name() {
  return getRuleContext<PLCSTParser::FB_Instance_NameContext>(0);
}

PLCSTParser::Class_Instance_NameContext* PLCSTParser::Interface_ValueContext::class_Instance_Name() {
  return getRuleContext<PLCSTParser::Class_Instance_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Interface_ValueContext::Null() {
  return getToken(PLCSTParser::Null, 0);
}


size_t PLCSTParser::Interface_ValueContext::getRuleIndex() const {
  return PLCSTParser::RuleInterface_Value;
}

void PLCSTParser::Interface_ValueContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInterface_Value(this);
}

void PLCSTParser::Interface_ValueContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInterface_Value(this);
}


std::any PLCSTParser::Interface_ValueContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInterface_Value(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Interface_ValueContext* PLCSTParser::interface_Value() {
  Interface_ValueContext *_localctx = _tracker.createInstance<Interface_ValueContext>(_ctx, getState());
  enterRule(_localctx, 266, PLCSTParser::RuleInterface_Value);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1575);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 159, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1571);
      symbolic_Variable();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1572);
      fB_Instance_Name();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(1573);
      class_Instance_Name();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(1574);
      match(PLCSTParser::Null);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Interface_Name_ListContext ------------------------------------------------------------------

PLCSTParser::Interface_Name_ListContext::Interface_Name_ListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Interface_Type_AccessContext *> PLCSTParser::Interface_Name_ListContext::interface_Type_Access() {
  return getRuleContexts<PLCSTParser::Interface_Type_AccessContext>();
}

PLCSTParser::Interface_Type_AccessContext* PLCSTParser::Interface_Name_ListContext::interface_Type_Access(size_t i) {
  return getRuleContext<PLCSTParser::Interface_Type_AccessContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Interface_Name_ListContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Interface_Name_ListContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Interface_Name_ListContext::getRuleIndex() const {
  return PLCSTParser::RuleInterface_Name_List;
}

void PLCSTParser::Interface_Name_ListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInterface_Name_List(this);
}

void PLCSTParser::Interface_Name_ListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInterface_Name_List(this);
}


std::any PLCSTParser::Interface_Name_ListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInterface_Name_List(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Interface_Name_ListContext* PLCSTParser::interface_Name_List() {
  Interface_Name_ListContext *_localctx = _tracker.createInstance<Interface_Name_ListContext>(_ctx, getState());
  enterRule(_localctx, 268, PLCSTParser::RuleInterface_Name_List);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1577);
    interface_Type_Access();
    setState(1582);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(1578);
      match(PLCSTParser::Comma);
      setState(1579);
      interface_Type_Access();
      setState(1584);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Interface_Type_AccessContext ------------------------------------------------------------------

PLCSTParser::Interface_Type_AccessContext::Interface_Type_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Interface_Type_NameContext* PLCSTParser::Interface_Type_AccessContext::interface_Type_Name() {
  return getRuleContext<PLCSTParser::Interface_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Interface_Type_AccessContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Interface_Type_AccessContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Interface_Type_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleInterface_Type_Access;
}

void PLCSTParser::Interface_Type_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInterface_Type_Access(this);
}

void PLCSTParser::Interface_Type_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInterface_Type_Access(this);
}


std::any PLCSTParser::Interface_Type_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInterface_Type_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Interface_Type_AccessContext* PLCSTParser::interface_Type_Access() {
  Interface_Type_AccessContext *_localctx = _tracker.createInstance<Interface_Type_AccessContext>(_ctx, getState());
  enterRule(_localctx, 270, PLCSTParser::RuleInterface_Type_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1588);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 161, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1585);
        nestedNameSpecifier(); 
      }
      setState(1590);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 161, _ctx);
    }
    setState(1591);
    interface_Type_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_DeclContext ------------------------------------------------------------------

PLCSTParser::Prog_DeclContext::Prog_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Prog_DeclContext::PROGRAM() {
  return getToken(PLCSTParser::PROGRAM, 0);
}

PLCSTParser::Prog_Type_NameContext* PLCSTParser::Prog_DeclContext::prog_Type_Name() {
  return getRuleContext<PLCSTParser::Prog_Type_NameContext>(0);
}

PLCSTParser::FB_BodyContext* PLCSTParser::Prog_DeclContext::fB_Body() {
  return getRuleContext<PLCSTParser::FB_BodyContext>(0);
}

tree::TerminalNode* PLCSTParser::Prog_DeclContext::END_PROGRAM() {
  return getToken(PLCSTParser::END_PROGRAM, 0);
}

std::vector<PLCSTParser::IO_Var_DeclsContext *> PLCSTParser::Prog_DeclContext::iO_Var_Decls() {
  return getRuleContexts<PLCSTParser::IO_Var_DeclsContext>();
}

PLCSTParser::IO_Var_DeclsContext* PLCSTParser::Prog_DeclContext::iO_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::IO_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Func_Var_DeclsContext *> PLCSTParser::Prog_DeclContext::func_Var_Decls() {
  return getRuleContexts<PLCSTParser::Func_Var_DeclsContext>();
}

PLCSTParser::Func_Var_DeclsContext* PLCSTParser::Prog_DeclContext::func_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Func_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Temp_Var_DeclsContext *> PLCSTParser::Prog_DeclContext::temp_Var_Decls() {
  return getRuleContexts<PLCSTParser::Temp_Var_DeclsContext>();
}

PLCSTParser::Temp_Var_DeclsContext* PLCSTParser::Prog_DeclContext::temp_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Temp_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Other_Var_DeclsContext *> PLCSTParser::Prog_DeclContext::other_Var_Decls() {
  return getRuleContexts<PLCSTParser::Other_Var_DeclsContext>();
}

PLCSTParser::Other_Var_DeclsContext* PLCSTParser::Prog_DeclContext::other_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Other_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Loc_Var_DeclsContext *> PLCSTParser::Prog_DeclContext::loc_Var_Decls() {
  return getRuleContexts<PLCSTParser::Loc_Var_DeclsContext>();
}

PLCSTParser::Loc_Var_DeclsContext* PLCSTParser::Prog_DeclContext::loc_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Loc_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Prog_Access_DeclsContext *> PLCSTParser::Prog_DeclContext::prog_Access_Decls() {
  return getRuleContexts<PLCSTParser::Prog_Access_DeclsContext>();
}

PLCSTParser::Prog_Access_DeclsContext* PLCSTParser::Prog_DeclContext::prog_Access_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Prog_Access_DeclsContext>(i);
}


size_t PLCSTParser::Prog_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Decl;
}

void PLCSTParser::Prog_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Decl(this);
}

void PLCSTParser::Prog_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Decl(this);
}


std::any PLCSTParser::Prog_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_DeclContext* PLCSTParser::prog_Decl() {
  Prog_DeclContext *_localctx = _tracker.createInstance<Prog_DeclContext>(_ctx, getState());
  enterRule(_localctx, 272, PLCSTParser::RuleProg_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1593);
    match(PLCSTParser::PROGRAM);
    setState(1594);
    prog_Type_Name();
    setState(1603);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 52) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 52)) & 549755817409) != 0) {
      setState(1601);
      _errHandler->sync(this);
      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 162, _ctx)) {
      case 1: {
        setState(1595);
        iO_Var_Decls();
        break;
      }

      case 2: {
        setState(1596);
        func_Var_Decls();
        break;
      }

      case 3: {
        setState(1597);
        temp_Var_Decls();
        break;
      }

      case 4: {
        setState(1598);
        other_Var_Decls();
        break;
      }

      case 5: {
        setState(1599);
        loc_Var_Decls();
        break;
      }

      case 6: {
        setState(1600);
        prog_Access_Decls();
        break;
      }

      default:
        break;
      }
      setState(1605);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1606);
    fB_Body();
    setState(1607);
    match(PLCSTParser::END_PROGRAM);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_Type_AccessContext ------------------------------------------------------------------

PLCSTParser::Prog_Type_AccessContext::Prog_Type_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Prog_Type_NameContext* PLCSTParser::Prog_Type_AccessContext::prog_Type_Name() {
  return getRuleContext<PLCSTParser::Prog_Type_NameContext>(0);
}

std::vector<PLCSTParser::NestedNameSpecifierContext *> PLCSTParser::Prog_Type_AccessContext::nestedNameSpecifier() {
  return getRuleContexts<PLCSTParser::NestedNameSpecifierContext>();
}

PLCSTParser::NestedNameSpecifierContext* PLCSTParser::Prog_Type_AccessContext::nestedNameSpecifier(size_t i) {
  return getRuleContext<PLCSTParser::NestedNameSpecifierContext>(i);
}


size_t PLCSTParser::Prog_Type_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Type_Access;
}

void PLCSTParser::Prog_Type_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Type_Access(this);
}

void PLCSTParser::Prog_Type_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Type_Access(this);
}


std::any PLCSTParser::Prog_Type_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Type_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_Type_AccessContext* PLCSTParser::prog_Type_Access() {
  Prog_Type_AccessContext *_localctx = _tracker.createInstance<Prog_Type_AccessContext>(_ctx, getState());
  enterRule(_localctx, 274, PLCSTParser::RuleProg_Type_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1612);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 164, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1609);
        nestedNameSpecifier(); 
      }
      setState(1614);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 164, _ctx);
    }
    setState(1615);
    prog_Type_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_Access_DeclsContext ------------------------------------------------------------------

PLCSTParser::Prog_Access_DeclsContext::Prog_Access_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Prog_Access_DeclsContext::VAR_ACCESS() {
  return getToken(PLCSTParser::VAR_ACCESS, 0);
}

tree::TerminalNode* PLCSTParser::Prog_Access_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::Prog_Access_DeclContext *> PLCSTParser::Prog_Access_DeclsContext::prog_Access_Decl() {
  return getRuleContexts<PLCSTParser::Prog_Access_DeclContext>();
}

PLCSTParser::Prog_Access_DeclContext* PLCSTParser::Prog_Access_DeclsContext::prog_Access_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Prog_Access_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Prog_Access_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Prog_Access_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::Prog_Access_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Access_Decls;
}

void PLCSTParser::Prog_Access_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Access_Decls(this);
}

void PLCSTParser::Prog_Access_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Access_Decls(this);
}


std::any PLCSTParser::Prog_Access_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Access_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_Access_DeclsContext* PLCSTParser::prog_Access_Decls() {
  Prog_Access_DeclsContext *_localctx = _tracker.createInstance<Prog_Access_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 276, PLCSTParser::RuleProg_Access_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1617);
    match(PLCSTParser::VAR_ACCESS);
    setState(1623);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1618);
      prog_Access_Decl();
      setState(1619);
      match(PLCSTParser::Semi);
      setState(1625);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1626);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_Access_DeclContext ------------------------------------------------------------------

PLCSTParser::Prog_Access_DeclContext::Prog_Access_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Access_NameContext* PLCSTParser::Prog_Access_DeclContext::access_Name() {
  return getRuleContext<PLCSTParser::Access_NameContext>(0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Prog_Access_DeclContext::Colon() {
  return getTokens(PLCSTParser::Colon);
}

tree::TerminalNode* PLCSTParser::Prog_Access_DeclContext::Colon(size_t i) {
  return getToken(PLCSTParser::Colon, i);
}

PLCSTParser::Symbolic_VariableContext* PLCSTParser::Prog_Access_DeclContext::symbolic_Variable() {
  return getRuleContext<PLCSTParser::Symbolic_VariableContext>(0);
}

PLCSTParser::Data_Type_AccessContext* PLCSTParser::Prog_Access_DeclContext::data_Type_Access() {
  return getRuleContext<PLCSTParser::Data_Type_AccessContext>(0);
}

tree::TerminalNode* PLCSTParser::Prog_Access_DeclContext::Multibit_Part_Access() {
  return getToken(PLCSTParser::Multibit_Part_Access, 0);
}

tree::TerminalNode* PLCSTParser::Prog_Access_DeclContext::Access_Direction() {
  return getToken(PLCSTParser::Access_Direction, 0);
}


size_t PLCSTParser::Prog_Access_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Access_Decl;
}

void PLCSTParser::Prog_Access_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Access_Decl(this);
}

void PLCSTParser::Prog_Access_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Access_Decl(this);
}


std::any PLCSTParser::Prog_Access_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Access_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_Access_DeclContext* PLCSTParser::prog_Access_Decl() {
  Prog_Access_DeclContext *_localctx = _tracker.createInstance<Prog_Access_DeclContext>(_ctx, getState());
  enterRule(_localctx, 278, PLCSTParser::RuleProg_Access_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1628);
    access_Name();
    setState(1629);
    match(PLCSTParser::Colon);
    setState(1630);
    symbolic_Variable();
    setState(1632);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Multibit_Part_Access) {
      setState(1631);
      match(PLCSTParser::Multibit_Part_Access);
    }
    setState(1634);
    match(PLCSTParser::Colon);
    setState(1635);
    data_Type_Access();
    setState(1637);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Access_Direction) {
      setState(1636);
      match(PLCSTParser::Access_Direction);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SFCContext ------------------------------------------------------------------

PLCSTParser::SFCContext::SFCContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Sfc_NetworkContext *> PLCSTParser::SFCContext::sfc_Network() {
  return getRuleContexts<PLCSTParser::Sfc_NetworkContext>();
}

PLCSTParser::Sfc_NetworkContext* PLCSTParser::SFCContext::sfc_Network(size_t i) {
  return getRuleContext<PLCSTParser::Sfc_NetworkContext>(i);
}


size_t PLCSTParser::SFCContext::getRuleIndex() const {
  return PLCSTParser::RuleSFC;
}

void PLCSTParser::SFCContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSFC(this);
}

void PLCSTParser::SFCContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSFC(this);
}


std::any PLCSTParser::SFCContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSFC(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::SFCContext* PLCSTParser::sFC() {
  SFCContext *_localctx = _tracker.createInstance<SFCContext>(_ctx, getState());
  enterRule(_localctx, 280, PLCSTParser::RuleSFC);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1640); 
    _errHandler->sync(this);
    alt = 1;
    do {
      switch (alt) {
        case 1: {
              setState(1639);
              sfc_Network();
              break;
            }

      default:
        throw NoViableAltException(this);
      }
      setState(1642); 
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 168, _ctx);
    } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Sfc_NetworkContext ------------------------------------------------------------------

PLCSTParser::Sfc_NetworkContext::Sfc_NetworkContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Initial_StepContext* PLCSTParser::Sfc_NetworkContext::initial_Step() {
  return getRuleContext<PLCSTParser::Initial_StepContext>(0);
}

std::vector<PLCSTParser::StepContext *> PLCSTParser::Sfc_NetworkContext::step() {
  return getRuleContexts<PLCSTParser::StepContext>();
}

PLCSTParser::StepContext* PLCSTParser::Sfc_NetworkContext::step(size_t i) {
  return getRuleContext<PLCSTParser::StepContext>(i);
}

std::vector<PLCSTParser::TransitionContext *> PLCSTParser::Sfc_NetworkContext::transition() {
  return getRuleContexts<PLCSTParser::TransitionContext>();
}

PLCSTParser::TransitionContext* PLCSTParser::Sfc_NetworkContext::transition(size_t i) {
  return getRuleContext<PLCSTParser::TransitionContext>(i);
}

std::vector<PLCSTParser::ActionContext *> PLCSTParser::Sfc_NetworkContext::action() {
  return getRuleContexts<PLCSTParser::ActionContext>();
}

PLCSTParser::ActionContext* PLCSTParser::Sfc_NetworkContext::action(size_t i) {
  return getRuleContext<PLCSTParser::ActionContext>(i);
}


size_t PLCSTParser::Sfc_NetworkContext::getRuleIndex() const {
  return PLCSTParser::RuleSfc_Network;
}

void PLCSTParser::Sfc_NetworkContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSfc_Network(this);
}

void PLCSTParser::Sfc_NetworkContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSfc_Network(this);
}


std::any PLCSTParser::Sfc_NetworkContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSfc_Network(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Sfc_NetworkContext* PLCSTParser::sfc_Network() {
  Sfc_NetworkContext *_localctx = _tracker.createInstance<Sfc_NetworkContext>(_ctx, getState());
  enterRule(_localctx, 282, PLCSTParser::RuleSfc_Network);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1644);
    initial_Step();
    setState(1650);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 94) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 94)) & 137) != 0) {
      setState(1648);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case PLCSTParser::STEP: {
          setState(1645);
          step();
          break;
        }

        case PLCSTParser::TRANSITION: {
          setState(1646);
          transition();
          break;
        }

        case PLCSTParser::ACTION: {
          setState(1647);
          action();
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(1652);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Initial_StepContext ------------------------------------------------------------------

PLCSTParser::Initial_StepContext::Initial_StepContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Initial_StepContext::INITIAL_STEP() {
  return getToken(PLCSTParser::INITIAL_STEP, 0);
}

PLCSTParser::Step_NameContext* PLCSTParser::Initial_StepContext::step_Name() {
  return getRuleContext<PLCSTParser::Step_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Initial_StepContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

tree::TerminalNode* PLCSTParser::Initial_StepContext::END_STEP() {
  return getToken(PLCSTParser::END_STEP, 0);
}

std::vector<PLCSTParser::Action_AssociationContext *> PLCSTParser::Initial_StepContext::action_Association() {
  return getRuleContexts<PLCSTParser::Action_AssociationContext>();
}

PLCSTParser::Action_AssociationContext* PLCSTParser::Initial_StepContext::action_Association(size_t i) {
  return getRuleContext<PLCSTParser::Action_AssociationContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Initial_StepContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Initial_StepContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::Initial_StepContext::getRuleIndex() const {
  return PLCSTParser::RuleInitial_Step;
}

void PLCSTParser::Initial_StepContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInitial_Step(this);
}

void PLCSTParser::Initial_StepContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInitial_Step(this);
}


std::any PLCSTParser::Initial_StepContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInitial_Step(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Initial_StepContext* PLCSTParser::initial_Step() {
  Initial_StepContext *_localctx = _tracker.createInstance<Initial_StepContext>(_ctx, getState());
  enterRule(_localctx, 284, PLCSTParser::RuleInitial_Step);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1653);
    match(PLCSTParser::INITIAL_STEP);
    setState(1654);
    step_Name();
    setState(1655);
    match(PLCSTParser::Colon);
    setState(1661);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1656);
      action_Association();
      setState(1657);
      match(PLCSTParser::Semi);
      setState(1663);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1664);
    match(PLCSTParser::END_STEP);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StepContext ------------------------------------------------------------------

PLCSTParser::StepContext::StepContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::StepContext::STEP() {
  return getToken(PLCSTParser::STEP, 0);
}

PLCSTParser::Step_NameContext* PLCSTParser::StepContext::step_Name() {
  return getRuleContext<PLCSTParser::Step_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::StepContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

tree::TerminalNode* PLCSTParser::StepContext::END_STEP() {
  return getToken(PLCSTParser::END_STEP, 0);
}

std::vector<PLCSTParser::Action_AssociationContext *> PLCSTParser::StepContext::action_Association() {
  return getRuleContexts<PLCSTParser::Action_AssociationContext>();
}

PLCSTParser::Action_AssociationContext* PLCSTParser::StepContext::action_Association(size_t i) {
  return getRuleContext<PLCSTParser::Action_AssociationContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::StepContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::StepContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::StepContext::getRuleIndex() const {
  return PLCSTParser::RuleStep;
}

void PLCSTParser::StepContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStep(this);
}

void PLCSTParser::StepContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStep(this);
}


std::any PLCSTParser::StepContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStep(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::StepContext* PLCSTParser::step() {
  StepContext *_localctx = _tracker.createInstance<StepContext>(_ctx, getState());
  enterRule(_localctx, 286, PLCSTParser::RuleStep);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1666);
    match(PLCSTParser::STEP);
    setState(1667);
    step_Name();
    setState(1668);
    match(PLCSTParser::Colon);
    setState(1674);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1669);
      action_Association();
      setState(1670);
      match(PLCSTParser::Semi);
      setState(1676);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1677);
    match(PLCSTParser::END_STEP);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Action_AssociationContext ------------------------------------------------------------------

PLCSTParser::Action_AssociationContext::Action_AssociationContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Action_NameContext* PLCSTParser::Action_AssociationContext::action_Name() {
  return getRuleContext<PLCSTParser::Action_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Action_AssociationContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

tree::TerminalNode* PLCSTParser::Action_AssociationContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

PLCSTParser::Action_QualifierContext* PLCSTParser::Action_AssociationContext::action_Qualifier() {
  return getRuleContext<PLCSTParser::Action_QualifierContext>(0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Action_AssociationContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Action_AssociationContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}

std::vector<PLCSTParser::Indicator_NameContext *> PLCSTParser::Action_AssociationContext::indicator_Name() {
  return getRuleContexts<PLCSTParser::Indicator_NameContext>();
}

PLCSTParser::Indicator_NameContext* PLCSTParser::Action_AssociationContext::indicator_Name(size_t i) {
  return getRuleContext<PLCSTParser::Indicator_NameContext>(i);
}


size_t PLCSTParser::Action_AssociationContext::getRuleIndex() const {
  return PLCSTParser::RuleAction_Association;
}

void PLCSTParser::Action_AssociationContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAction_Association(this);
}

void PLCSTParser::Action_AssociationContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAction_Association(this);
}


std::any PLCSTParser::Action_AssociationContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAction_Association(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Action_AssociationContext* PLCSTParser::action_Association() {
  Action_AssociationContext *_localctx = _tracker.createInstance<Action_AssociationContext>(_ctx, getState());
  enterRule(_localctx, 288, PLCSTParser::RuleAction_Association);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1679);
    action_Name();
    setState(1680);
    match(PLCSTParser::LeftParen);
    setState(1682);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::ACTION_QUALIFIER

    || _la == PLCSTParser::ACTION_TIME_QUALIFIER) {
      setState(1681);
      action_Qualifier();
    }
    setState(1688);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(1684);
      match(PLCSTParser::Comma);
      setState(1685);
      indicator_Name();
      setState(1690);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1691);
    match(PLCSTParser::RightParen);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Action_QualifierContext ------------------------------------------------------------------

PLCSTParser::Action_QualifierContext::Action_QualifierContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Action_QualifierContext::ACTION_QUALIFIER() {
  return getToken(PLCSTParser::ACTION_QUALIFIER, 0);
}

tree::TerminalNode* PLCSTParser::Action_QualifierContext::ACTION_TIME_QUALIFIER() {
  return getToken(PLCSTParser::ACTION_TIME_QUALIFIER, 0);
}

tree::TerminalNode* PLCSTParser::Action_QualifierContext::Comma() {
  return getToken(PLCSTParser::Comma, 0);
}

PLCSTParser::Action_TimeContext* PLCSTParser::Action_QualifierContext::action_Time() {
  return getRuleContext<PLCSTParser::Action_TimeContext>(0);
}


size_t PLCSTParser::Action_QualifierContext::getRuleIndex() const {
  return PLCSTParser::RuleAction_Qualifier;
}

void PLCSTParser::Action_QualifierContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAction_Qualifier(this);
}

void PLCSTParser::Action_QualifierContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAction_Qualifier(this);
}


std::any PLCSTParser::Action_QualifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAction_Qualifier(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Action_QualifierContext* PLCSTParser::action_Qualifier() {
  Action_QualifierContext *_localctx = _tracker.createInstance<Action_QualifierContext>(_ctx, getState());
  enterRule(_localctx, 290, PLCSTParser::RuleAction_Qualifier);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1697);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::ACTION_QUALIFIER: {
        enterOuterAlt(_localctx, 1);
        setState(1693);
        match(PLCSTParser::ACTION_QUALIFIER);
        break;
      }

      case PLCSTParser::ACTION_TIME_QUALIFIER: {
        enterOuterAlt(_localctx, 2);
        setState(1694);
        match(PLCSTParser::ACTION_TIME_QUALIFIER);
        setState(1695);
        match(PLCSTParser::Comma);
        setState(1696);
        action_Time();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Action_TimeContext ------------------------------------------------------------------

PLCSTParser::Action_TimeContext::Action_TimeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Action_TimeContext::Duration() {
  return getToken(PLCSTParser::Duration, 0);
}

PLCSTParser::Variable_NameContext* PLCSTParser::Action_TimeContext::variable_Name() {
  return getRuleContext<PLCSTParser::Variable_NameContext>(0);
}


size_t PLCSTParser::Action_TimeContext::getRuleIndex() const {
  return PLCSTParser::RuleAction_Time;
}

void PLCSTParser::Action_TimeContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAction_Time(this);
}

void PLCSTParser::Action_TimeContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAction_Time(this);
}


std::any PLCSTParser::Action_TimeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAction_Time(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Action_TimeContext* PLCSTParser::action_Time() {
  Action_TimeContext *_localctx = _tracker.createInstance<Action_TimeContext>(_ctx, getState());
  enterRule(_localctx, 292, PLCSTParser::RuleAction_Time);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1701);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::Duration: {
        enterOuterAlt(_localctx, 1);
        setState(1699);
        match(PLCSTParser::Duration);
        break;
      }

      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        enterOuterAlt(_localctx, 2);
        setState(1700);
        variable_Name();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TransitionContext ------------------------------------------------------------------

PLCSTParser::TransitionContext::TransitionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::TransitionContext::TRANSITION() {
  return getToken(PLCSTParser::TRANSITION, 0);
}

tree::TerminalNode* PLCSTParser::TransitionContext::FROM() {
  return getToken(PLCSTParser::FROM, 0);
}

std::vector<PLCSTParser::StepsContext *> PLCSTParser::TransitionContext::steps() {
  return getRuleContexts<PLCSTParser::StepsContext>();
}

PLCSTParser::StepsContext* PLCSTParser::TransitionContext::steps(size_t i) {
  return getRuleContext<PLCSTParser::StepsContext>(i);
}

tree::TerminalNode* PLCSTParser::TransitionContext::TO() {
  return getToken(PLCSTParser::TO, 0);
}

tree::TerminalNode* PLCSTParser::TransitionContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Transition_CondContext* PLCSTParser::TransitionContext::transition_Cond() {
  return getRuleContext<PLCSTParser::Transition_CondContext>(0);
}

tree::TerminalNode* PLCSTParser::TransitionContext::END_TRANSITION() {
  return getToken(PLCSTParser::END_TRANSITION, 0);
}

PLCSTParser::Transition_NameContext* PLCSTParser::TransitionContext::transition_Name() {
  return getRuleContext<PLCSTParser::Transition_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::TransitionContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

tree::TerminalNode* PLCSTParser::TransitionContext::PRIORITY() {
  return getToken(PLCSTParser::PRIORITY, 0);
}

tree::TerminalNode* PLCSTParser::TransitionContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

tree::TerminalNode* PLCSTParser::TransitionContext::Unsigned_Int() {
  return getToken(PLCSTParser::Unsigned_Int, 0);
}

tree::TerminalNode* PLCSTParser::TransitionContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}


size_t PLCSTParser::TransitionContext::getRuleIndex() const {
  return PLCSTParser::RuleTransition;
}

void PLCSTParser::TransitionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTransition(this);
}

void PLCSTParser::TransitionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTransition(this);
}


std::any PLCSTParser::TransitionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitTransition(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::TransitionContext* PLCSTParser::transition() {
  TransitionContext *_localctx = _tracker.createInstance<TransitionContext>(_ctx, getState());
  enterRule(_localctx, 294, PLCSTParser::RuleTransition);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1703);
    match(PLCSTParser::TRANSITION);
    setState(1705);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1704);
      transition_Name();
    }
    setState(1712);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::LeftParen) {
      setState(1707);
      match(PLCSTParser::LeftParen);
      setState(1708);
      match(PLCSTParser::PRIORITY);
      setState(1709);
      match(PLCSTParser::Assign);
      setState(1710);
      match(PLCSTParser::Unsigned_Int);
      setState(1711);
      match(PLCSTParser::RightParen);
    }
    setState(1714);
    match(PLCSTParser::FROM);
    setState(1715);
    steps();
    setState(1716);
    match(PLCSTParser::TO);
    setState(1717);
    steps();
    setState(1718);
    match(PLCSTParser::Colon);
    setState(1719);
    transition_Cond();
    setState(1720);
    match(PLCSTParser::END_TRANSITION);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StepsContext ------------------------------------------------------------------

PLCSTParser::StepsContext::StepsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Step_NameContext *> PLCSTParser::StepsContext::step_Name() {
  return getRuleContexts<PLCSTParser::Step_NameContext>();
}

PLCSTParser::Step_NameContext* PLCSTParser::StepsContext::step_Name(size_t i) {
  return getRuleContext<PLCSTParser::Step_NameContext>(i);
}

tree::TerminalNode* PLCSTParser::StepsContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

tree::TerminalNode* PLCSTParser::StepsContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::StepsContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::StepsContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::StepsContext::getRuleIndex() const {
  return PLCSTParser::RuleSteps;
}

void PLCSTParser::StepsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSteps(this);
}

void PLCSTParser::StepsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSteps(this);
}


std::any PLCSTParser::StepsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSteps(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::StepsContext* PLCSTParser::steps() {
  StepsContext *_localctx = _tracker.createInstance<StepsContext>(_ctx, getState());
  enterRule(_localctx, 296, PLCSTParser::RuleSteps);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1733);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        enterOuterAlt(_localctx, 1);
        setState(1722);
        step_Name();
        break;
      }

      case PLCSTParser::LeftParen: {
        enterOuterAlt(_localctx, 2);
        setState(1723);
        match(PLCSTParser::LeftParen);
        setState(1724);
        step_Name();
        setState(1727); 
        _errHandler->sync(this);
        _la = _input->LA(1);
        do {
          setState(1725);
          match(PLCSTParser::Comma);
          setState(1726);
          step_Name();
          setState(1729); 
          _errHandler->sync(this);
          _la = _input->LA(1);
        } while (_la == PLCSTParser::Comma);
        setState(1731);
        match(PLCSTParser::RightParen);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Transition_CondContext ------------------------------------------------------------------

PLCSTParser::Transition_CondContext::Transition_CondContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Transition_CondContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::ExpressionContext* PLCSTParser::Transition_CondContext::expression() {
  return getRuleContext<PLCSTParser::ExpressionContext>(0);
}

tree::TerminalNode* PLCSTParser::Transition_CondContext::Semi() {
  return getToken(PLCSTParser::Semi, 0);
}


size_t PLCSTParser::Transition_CondContext::getRuleIndex() const {
  return PLCSTParser::RuleTransition_Cond;
}

void PLCSTParser::Transition_CondContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTransition_Cond(this);
}

void PLCSTParser::Transition_CondContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTransition_Cond(this);
}


std::any PLCSTParser::Transition_CondContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitTransition_Cond(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Transition_CondContext* PLCSTParser::transition_Cond() {
  Transition_CondContext *_localctx = _tracker.createInstance<Transition_CondContext>(_ctx, getState());
  enterRule(_localctx, 298, PLCSTParser::RuleTransition_Cond);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1735);
    match(PLCSTParser::Assign);
    setState(1736);
    expression();
    setState(1737);
    match(PLCSTParser::Semi);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ActionContext ------------------------------------------------------------------

PLCSTParser::ActionContext::ActionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::ActionContext::ACTION() {
  return getToken(PLCSTParser::ACTION, 0);
}

PLCSTParser::Action_NameContext* PLCSTParser::ActionContext::action_Name() {
  return getRuleContext<PLCSTParser::Action_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::ActionContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::FB_BodyContext* PLCSTParser::ActionContext::fB_Body() {
  return getRuleContext<PLCSTParser::FB_BodyContext>(0);
}

tree::TerminalNode* PLCSTParser::ActionContext::END_ACTION() {
  return getToken(PLCSTParser::END_ACTION, 0);
}


size_t PLCSTParser::ActionContext::getRuleIndex() const {
  return PLCSTParser::RuleAction;
}

void PLCSTParser::ActionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAction(this);
}

void PLCSTParser::ActionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAction(this);
}


std::any PLCSTParser::ActionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAction(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::ActionContext* PLCSTParser::action() {
  ActionContext *_localctx = _tracker.createInstance<ActionContext>(_ctx, getState());
  enterRule(_localctx, 300, PLCSTParser::RuleAction);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1739);
    match(PLCSTParser::ACTION);
    setState(1740);
    action_Name();
    setState(1741);
    match(PLCSTParser::Colon);
    setState(1742);
    fB_Body();
    setState(1743);
    match(PLCSTParser::END_ACTION);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Config_DeclContext ------------------------------------------------------------------

PLCSTParser::Config_DeclContext::Config_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Config_DeclContext::CONFIGURATION() {
  return getToken(PLCSTParser::CONFIGURATION, 0);
}

PLCSTParser::Config_NameContext* PLCSTParser::Config_DeclContext::config_Name() {
  return getRuleContext<PLCSTParser::Config_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Config_DeclContext::END_CONFIGURATION() {
  return getToken(PLCSTParser::END_CONFIGURATION, 0);
}

PLCSTParser::Single_Resource_DeclContext* PLCSTParser::Config_DeclContext::single_Resource_Decl() {
  return getRuleContext<PLCSTParser::Single_Resource_DeclContext>(0);
}

PLCSTParser::Global_Var_DeclsContext* PLCSTParser::Config_DeclContext::global_Var_Decls() {
  return getRuleContext<PLCSTParser::Global_Var_DeclsContext>(0);
}

PLCSTParser::Access_DeclsContext* PLCSTParser::Config_DeclContext::access_Decls() {
  return getRuleContext<PLCSTParser::Access_DeclsContext>(0);
}

PLCSTParser::Config_InitContext* PLCSTParser::Config_DeclContext::config_Init() {
  return getRuleContext<PLCSTParser::Config_InitContext>(0);
}

std::vector<PLCSTParser::Resource_DeclContext *> PLCSTParser::Config_DeclContext::resource_Decl() {
  return getRuleContexts<PLCSTParser::Resource_DeclContext>();
}

PLCSTParser::Resource_DeclContext* PLCSTParser::Config_DeclContext::resource_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Resource_DeclContext>(i);
}


size_t PLCSTParser::Config_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleConfig_Decl;
}

void PLCSTParser::Config_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConfig_Decl(this);
}

void PLCSTParser::Config_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConfig_Decl(this);
}


std::any PLCSTParser::Config_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitConfig_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Config_DeclContext* PLCSTParser::config_Decl() {
  Config_DeclContext *_localctx = _tracker.createInstance<Config_DeclContext>(_ctx, getState());
  enterRule(_localctx, 302, PLCSTParser::RuleConfig_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1745);
    match(PLCSTParser::CONFIGURATION);
    setState(1746);
    config_Name();
    setState(1748);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::VAR_GLOBAL) {
      setState(1747);
      global_Var_Decls();
    }
    setState(1756);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::PROGRAM:
      case PLCSTParser::TASK: {
        setState(1750);
        single_Resource_Decl();
        break;
      }

      case PLCSTParser::RESOURCE: {
        setState(1752); 
        _errHandler->sync(this);
        _la = _input->LA(1);
        do {
          setState(1751);
          resource_Decl();
          setState(1754); 
          _errHandler->sync(this);
          _la = _input->LA(1);
        } while (_la == PLCSTParser::RESOURCE);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
    setState(1759);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::VAR_ACCESS) {
      setState(1758);
      access_Decls();
    }
    setState(1762);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::VAR_CONFIG) {
      setState(1761);
      config_Init();
    }
    setState(1764);
    match(PLCSTParser::END_CONFIGURATION);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Resource_DeclContext ------------------------------------------------------------------

PLCSTParser::Resource_DeclContext::Resource_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Resource_DeclContext::RESOURCE() {
  return getToken(PLCSTParser::RESOURCE, 0);
}

PLCSTParser::Resource_NameContext* PLCSTParser::Resource_DeclContext::resource_Name() {
  return getRuleContext<PLCSTParser::Resource_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Resource_DeclContext::ON() {
  return getToken(PLCSTParser::ON, 0);
}

PLCSTParser::Resource_Type_NameContext* PLCSTParser::Resource_DeclContext::resource_Type_Name() {
  return getRuleContext<PLCSTParser::Resource_Type_NameContext>(0);
}

PLCSTParser::Single_Resource_DeclContext* PLCSTParser::Resource_DeclContext::single_Resource_Decl() {
  return getRuleContext<PLCSTParser::Single_Resource_DeclContext>(0);
}

tree::TerminalNode* PLCSTParser::Resource_DeclContext::END_RESOURCE() {
  return getToken(PLCSTParser::END_RESOURCE, 0);
}

PLCSTParser::Global_Var_DeclsContext* PLCSTParser::Resource_DeclContext::global_Var_Decls() {
  return getRuleContext<PLCSTParser::Global_Var_DeclsContext>(0);
}


size_t PLCSTParser::Resource_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleResource_Decl;
}

void PLCSTParser::Resource_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterResource_Decl(this);
}

void PLCSTParser::Resource_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitResource_Decl(this);
}


std::any PLCSTParser::Resource_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitResource_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Resource_DeclContext* PLCSTParser::resource_Decl() {
  Resource_DeclContext *_localctx = _tracker.createInstance<Resource_DeclContext>(_ctx, getState());
  enterRule(_localctx, 304, PLCSTParser::RuleResource_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1766);
    match(PLCSTParser::RESOURCE);
    setState(1767);
    resource_Name();
    setState(1768);
    match(PLCSTParser::ON);
    setState(1769);
    resource_Type_Name();
    setState(1771);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::VAR_GLOBAL) {
      setState(1770);
      global_Var_Decls();
    }
    setState(1773);
    single_Resource_Decl();
    setState(1774);
    match(PLCSTParser::END_RESOURCE);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Single_Resource_DeclContext ------------------------------------------------------------------

PLCSTParser::Single_Resource_DeclContext::Single_Resource_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Task_ConfigContext *> PLCSTParser::Single_Resource_DeclContext::task_Config() {
  return getRuleContexts<PLCSTParser::Task_ConfigContext>();
}

PLCSTParser::Task_ConfigContext* PLCSTParser::Single_Resource_DeclContext::task_Config(size_t i) {
  return getRuleContext<PLCSTParser::Task_ConfigContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Single_Resource_DeclContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Single_Resource_DeclContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}

std::vector<PLCSTParser::Prog_ConfigContext *> PLCSTParser::Single_Resource_DeclContext::prog_Config() {
  return getRuleContexts<PLCSTParser::Prog_ConfigContext>();
}

PLCSTParser::Prog_ConfigContext* PLCSTParser::Single_Resource_DeclContext::prog_Config(size_t i) {
  return getRuleContext<PLCSTParser::Prog_ConfigContext>(i);
}


size_t PLCSTParser::Single_Resource_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleSingle_Resource_Decl;
}

void PLCSTParser::Single_Resource_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSingle_Resource_Decl(this);
}

void PLCSTParser::Single_Resource_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSingle_Resource_Decl(this);
}


std::any PLCSTParser::Single_Resource_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSingle_Resource_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Single_Resource_DeclContext* PLCSTParser::single_Resource_Decl() {
  Single_Resource_DeclContext *_localctx = _tracker.createInstance<Single_Resource_DeclContext>(_ctx, getState());
  enterRule(_localctx, 306, PLCSTParser::RuleSingle_Resource_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1781);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::TASK) {
      setState(1776);
      task_Config();
      setState(1777);
      match(PLCSTParser::Semi);
      setState(1783);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1787); 
    _errHandler->sync(this);
    _la = _input->LA(1);
    do {
      setState(1784);
      prog_Config();
      setState(1785);
      match(PLCSTParser::Semi);
      setState(1789); 
      _errHandler->sync(this);
      _la = _input->LA(1);
    } while (_la == PLCSTParser::PROGRAM);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Access_DeclsContext ------------------------------------------------------------------

PLCSTParser::Access_DeclsContext::Access_DeclsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Access_DeclsContext::VAR_ACCESS() {
  return getToken(PLCSTParser::VAR_ACCESS, 0);
}

tree::TerminalNode* PLCSTParser::Access_DeclsContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::Access_DeclContext *> PLCSTParser::Access_DeclsContext::access_Decl() {
  return getRuleContexts<PLCSTParser::Access_DeclContext>();
}

PLCSTParser::Access_DeclContext* PLCSTParser::Access_DeclsContext::access_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Access_DeclContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Access_DeclsContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Access_DeclsContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::Access_DeclsContext::getRuleIndex() const {
  return PLCSTParser::RuleAccess_Decls;
}

void PLCSTParser::Access_DeclsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAccess_Decls(this);
}

void PLCSTParser::Access_DeclsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAccess_Decls(this);
}


std::any PLCSTParser::Access_DeclsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAccess_Decls(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Access_DeclsContext* PLCSTParser::access_Decls() {
  Access_DeclsContext *_localctx = _tracker.createInstance<Access_DeclsContext>(_ctx, getState());
  enterRule(_localctx, 308, PLCSTParser::RuleAccess_Decls);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1791);
    match(PLCSTParser::VAR_ACCESS);
    setState(1797);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1792);
      access_Decl();
      setState(1793);
      match(PLCSTParser::Semi);
      setState(1799);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1800);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Access_DeclContext ------------------------------------------------------------------

PLCSTParser::Access_DeclContext::Access_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Access_NameContext* PLCSTParser::Access_DeclContext::access_Name() {
  return getRuleContext<PLCSTParser::Access_NameContext>(0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Access_DeclContext::Colon() {
  return getTokens(PLCSTParser::Colon);
}

tree::TerminalNode* PLCSTParser::Access_DeclContext::Colon(size_t i) {
  return getToken(PLCSTParser::Colon, i);
}

PLCSTParser::Access_PathContext* PLCSTParser::Access_DeclContext::access_Path() {
  return getRuleContext<PLCSTParser::Access_PathContext>(0);
}

PLCSTParser::Data_Type_AccessContext* PLCSTParser::Access_DeclContext::data_Type_Access() {
  return getRuleContext<PLCSTParser::Data_Type_AccessContext>(0);
}

tree::TerminalNode* PLCSTParser::Access_DeclContext::Access_Direction() {
  return getToken(PLCSTParser::Access_Direction, 0);
}


size_t PLCSTParser::Access_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleAccess_Decl;
}

void PLCSTParser::Access_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAccess_Decl(this);
}

void PLCSTParser::Access_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAccess_Decl(this);
}


std::any PLCSTParser::Access_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAccess_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Access_DeclContext* PLCSTParser::access_Decl() {
  Access_DeclContext *_localctx = _tracker.createInstance<Access_DeclContext>(_ctx, getState());
  enterRule(_localctx, 310, PLCSTParser::RuleAccess_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1802);
    access_Name();
    setState(1803);
    match(PLCSTParser::Colon);
    setState(1804);
    access_Path();
    setState(1805);
    match(PLCSTParser::Colon);
    setState(1806);
    data_Type_Access();
    setState(1808);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Access_Direction) {
      setState(1807);
      match(PLCSTParser::Access_Direction);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Access_PathContext ------------------------------------------------------------------

PLCSTParser::Access_PathContext::Access_PathContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Access_PathContext::Direct_Variable() {
  return getToken(PLCSTParser::Direct_Variable, 0);
}

PLCSTParser::Resource_NameContext* PLCSTParser::Access_PathContext::resource_Name() {
  return getRuleContext<PLCSTParser::Resource_NameContext>(0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Access_PathContext::Dot() {
  return getTokens(PLCSTParser::Dot);
}

tree::TerminalNode* PLCSTParser::Access_PathContext::Dot(size_t i) {
  return getToken(PLCSTParser::Dot, i);
}

PLCSTParser::Symbolic_VariableContext* PLCSTParser::Access_PathContext::symbolic_Variable() {
  return getRuleContext<PLCSTParser::Symbolic_VariableContext>(0);
}

PLCSTParser::Prog_NameContext* PLCSTParser::Access_PathContext::prog_Name() {
  return getRuleContext<PLCSTParser::Prog_NameContext>(0);
}

std::vector<PLCSTParser::FB_Instance_NameContext *> PLCSTParser::Access_PathContext::fB_Instance_Name() {
  return getRuleContexts<PLCSTParser::FB_Instance_NameContext>();
}

PLCSTParser::FB_Instance_NameContext* PLCSTParser::Access_PathContext::fB_Instance_Name(size_t i) {
  return getRuleContext<PLCSTParser::FB_Instance_NameContext>(i);
}

std::vector<PLCSTParser::Class_Instance_NameContext *> PLCSTParser::Access_PathContext::class_Instance_Name() {
  return getRuleContexts<PLCSTParser::Class_Instance_NameContext>();
}

PLCSTParser::Class_Instance_NameContext* PLCSTParser::Access_PathContext::class_Instance_Name(size_t i) {
  return getRuleContext<PLCSTParser::Class_Instance_NameContext>(i);
}


size_t PLCSTParser::Access_PathContext::getRuleIndex() const {
  return PLCSTParser::RuleAccess_Path;
}

void PLCSTParser::Access_PathContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAccess_Path(this);
}

void PLCSTParser::Access_PathContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAccess_Path(this);
}


std::any PLCSTParser::Access_PathContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAccess_Path(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Access_PathContext* PLCSTParser::access_Path() {
  Access_PathContext *_localctx = _tracker.createInstance<Access_PathContext>(_ctx, getState());
  enterRule(_localctx, 312, PLCSTParser::RuleAccess_Path);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    setState(1838);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 196, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1813);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la - 95) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
        setState(1810);
        resource_Name();
        setState(1811);
        match(PLCSTParser::Dot);
      }
      setState(1815);
      match(PLCSTParser::Direct_Variable);
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1819);
      _errHandler->sync(this);

      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 192, _ctx)) {
      case 1: {
        setState(1816);
        resource_Name();
        setState(1817);
        match(PLCSTParser::Dot);
        break;
      }

      default:
        break;
      }
      setState(1824);
      _errHandler->sync(this);

      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 193, _ctx)) {
      case 1: {
        setState(1821);
        prog_Name();
        setState(1822);
        match(PLCSTParser::Dot);
        break;
      }

      default:
        break;
      }
      setState(1834);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 195, _ctx);
      while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
        if (alt == 1) {
          setState(1828);
          _errHandler->sync(this);
          switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 194, _ctx)) {
          case 1: {
            setState(1826);
            fB_Instance_Name();
            break;
          }

          case 2: {
            setState(1827);
            class_Instance_Name();
            break;
          }

          default:
            break;
          }
          setState(1830);
          match(PLCSTParser::Dot); 
        }
        setState(1836);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 195, _ctx);
      }
      setState(1837);
      symbolic_Variable();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Global_Var_AccessContext ------------------------------------------------------------------

PLCSTParser::Global_Var_AccessContext::Global_Var_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Global_Var_NameContext* PLCSTParser::Global_Var_AccessContext::global_Var_Name() {
  return getRuleContext<PLCSTParser::Global_Var_NameContext>(0);
}

PLCSTParser::Resource_NameContext* PLCSTParser::Global_Var_AccessContext::resource_Name() {
  return getRuleContext<PLCSTParser::Resource_NameContext>(0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Global_Var_AccessContext::Dot() {
  return getTokens(PLCSTParser::Dot);
}

tree::TerminalNode* PLCSTParser::Global_Var_AccessContext::Dot(size_t i) {
  return getToken(PLCSTParser::Dot, i);
}

PLCSTParser::Struct_Elem_NameContext* PLCSTParser::Global_Var_AccessContext::struct_Elem_Name() {
  return getRuleContext<PLCSTParser::Struct_Elem_NameContext>(0);
}


size_t PLCSTParser::Global_Var_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleGlobal_Var_Access;
}

void PLCSTParser::Global_Var_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterGlobal_Var_Access(this);
}

void PLCSTParser::Global_Var_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitGlobal_Var_Access(this);
}


std::any PLCSTParser::Global_Var_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitGlobal_Var_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Global_Var_AccessContext* PLCSTParser::global_Var_Access() {
  Global_Var_AccessContext *_localctx = _tracker.createInstance<Global_Var_AccessContext>(_ctx, getState());
  enterRule(_localctx, 314, PLCSTParser::RuleGlobal_Var_Access);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1843);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 197, _ctx)) {
    case 1: {
      setState(1840);
      resource_Name();
      setState(1841);
      match(PLCSTParser::Dot);
      break;
    }

    default:
      break;
    }
    setState(1845);
    global_Var_Name();
    setState(1848);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Dot) {
      setState(1846);
      match(PLCSTParser::Dot);
      setState(1847);
      struct_Elem_Name();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_Output_AccessContext ------------------------------------------------------------------

PLCSTParser::Prog_Output_AccessContext::Prog_Output_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Prog_NameContext* PLCSTParser::Prog_Output_AccessContext::prog_Name() {
  return getRuleContext<PLCSTParser::Prog_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Prog_Output_AccessContext::Dot() {
  return getToken(PLCSTParser::Dot, 0);
}

PLCSTParser::Symbolic_VariableContext* PLCSTParser::Prog_Output_AccessContext::symbolic_Variable() {
  return getRuleContext<PLCSTParser::Symbolic_VariableContext>(0);
}


size_t PLCSTParser::Prog_Output_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Output_Access;
}

void PLCSTParser::Prog_Output_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Output_Access(this);
}

void PLCSTParser::Prog_Output_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Output_Access(this);
}


std::any PLCSTParser::Prog_Output_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Output_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_Output_AccessContext* PLCSTParser::prog_Output_Access() {
  Prog_Output_AccessContext *_localctx = _tracker.createInstance<Prog_Output_AccessContext>(_ctx, getState());
  enterRule(_localctx, 316, PLCSTParser::RuleProg_Output_Access);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1850);
    prog_Name();
    setState(1851);
    match(PLCSTParser::Dot);
    setState(1852);
    symbolic_Variable();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Task_ConfigContext ------------------------------------------------------------------

PLCSTParser::Task_ConfigContext::Task_ConfigContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Task_ConfigContext::TASK() {
  return getToken(PLCSTParser::TASK, 0);
}

PLCSTParser::Task_NameContext* PLCSTParser::Task_ConfigContext::task_Name() {
  return getRuleContext<PLCSTParser::Task_NameContext>(0);
}

PLCSTParser::Task_InitContext* PLCSTParser::Task_ConfigContext::task_Init() {
  return getRuleContext<PLCSTParser::Task_InitContext>(0);
}


size_t PLCSTParser::Task_ConfigContext::getRuleIndex() const {
  return PLCSTParser::RuleTask_Config;
}

void PLCSTParser::Task_ConfigContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTask_Config(this);
}

void PLCSTParser::Task_ConfigContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTask_Config(this);
}


std::any PLCSTParser::Task_ConfigContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitTask_Config(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Task_ConfigContext* PLCSTParser::task_Config() {
  Task_ConfigContext *_localctx = _tracker.createInstance<Task_ConfigContext>(_ctx, getState());
  enterRule(_localctx, 318, PLCSTParser::RuleTask_Config);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1854);
    match(PLCSTParser::TASK);
    setState(1855);
    task_Name();
    setState(1856);
    task_Init();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Task_InitContext ------------------------------------------------------------------

PLCSTParser::Task_InitContext::Task_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Task_InitContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

tree::TerminalNode* PLCSTParser::Task_InitContext::PRIORITY() {
  return getToken(PLCSTParser::PRIORITY, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Task_InitContext::Assign() {
  return getTokens(PLCSTParser::Assign);
}

tree::TerminalNode* PLCSTParser::Task_InitContext::Assign(size_t i) {
  return getToken(PLCSTParser::Assign, i);
}

tree::TerminalNode* PLCSTParser::Task_InitContext::Unsigned_Int() {
  return getToken(PLCSTParser::Unsigned_Int, 0);
}

tree::TerminalNode* PLCSTParser::Task_InitContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

tree::TerminalNode* PLCSTParser::Task_InitContext::SINGLE() {
  return getToken(PLCSTParser::SINGLE, 0);
}

std::vector<PLCSTParser::Data_SourceContext *> PLCSTParser::Task_InitContext::data_Source() {
  return getRuleContexts<PLCSTParser::Data_SourceContext>();
}

PLCSTParser::Data_SourceContext* PLCSTParser::Task_InitContext::data_Source(size_t i) {
  return getRuleContext<PLCSTParser::Data_SourceContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Task_InitContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Task_InitContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}

tree::TerminalNode* PLCSTParser::Task_InitContext::INTERVAL() {
  return getToken(PLCSTParser::INTERVAL, 0);
}


size_t PLCSTParser::Task_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleTask_Init;
}

void PLCSTParser::Task_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTask_Init(this);
}

void PLCSTParser::Task_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTask_Init(this);
}


std::any PLCSTParser::Task_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitTask_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Task_InitContext* PLCSTParser::task_Init() {
  Task_InitContext *_localctx = _tracker.createInstance<Task_InitContext>(_ctx, getState());
  enterRule(_localctx, 320, PLCSTParser::RuleTask_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1858);
    match(PLCSTParser::LeftParen);
    setState(1864);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::SINGLE) {
      setState(1859);
      match(PLCSTParser::SINGLE);
      setState(1860);
      match(PLCSTParser::Assign);
      setState(1861);
      data_Source();
      setState(1862);
      match(PLCSTParser::Comma);
    }
    setState(1871);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::INTERVAL) {
      setState(1866);
      match(PLCSTParser::INTERVAL);
      setState(1867);
      match(PLCSTParser::Assign);
      setState(1868);
      data_Source();
      setState(1869);
      match(PLCSTParser::Comma);
    }
    setState(1873);
    match(PLCSTParser::PRIORITY);
    setState(1874);
    match(PLCSTParser::Assign);
    setState(1875);
    match(PLCSTParser::Unsigned_Int);
    setState(1876);
    match(PLCSTParser::RightParen);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Data_SourceContext ------------------------------------------------------------------

PLCSTParser::Data_SourceContext::Data_SourceContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::ConstantContext* PLCSTParser::Data_SourceContext::constant() {
  return getRuleContext<PLCSTParser::ConstantContext>(0);
}

PLCSTParser::Global_Var_AccessContext* PLCSTParser::Data_SourceContext::global_Var_Access() {
  return getRuleContext<PLCSTParser::Global_Var_AccessContext>(0);
}

PLCSTParser::Prog_Output_AccessContext* PLCSTParser::Data_SourceContext::prog_Output_Access() {
  return getRuleContext<PLCSTParser::Prog_Output_AccessContext>(0);
}

tree::TerminalNode* PLCSTParser::Data_SourceContext::Direct_Variable() {
  return getToken(PLCSTParser::Direct_Variable, 0);
}


size_t PLCSTParser::Data_SourceContext::getRuleIndex() const {
  return PLCSTParser::RuleData_Source;
}

void PLCSTParser::Data_SourceContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterData_Source(this);
}

void PLCSTParser::Data_SourceContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitData_Source(this);
}


std::any PLCSTParser::Data_SourceContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitData_Source(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Data_SourceContext* PLCSTParser::data_Source() {
  Data_SourceContext *_localctx = _tracker.createInstance<Data_SourceContext>(_ctx, getState());
  enterRule(_localctx, 322, PLCSTParser::RuleData_Source);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1882);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 201, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1878);
      constant();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1879);
      global_Var_Access();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(1880);
      prog_Output_Access();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(1881);
      match(PLCSTParser::Direct_Variable);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_ConfigContext ------------------------------------------------------------------

PLCSTParser::Prog_ConfigContext::Prog_ConfigContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Prog_ConfigContext::PROGRAM() {
  return getToken(PLCSTParser::PROGRAM, 0);
}

PLCSTParser::Prog_NameContext* PLCSTParser::Prog_ConfigContext::prog_Name() {
  return getRuleContext<PLCSTParser::Prog_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Prog_ConfigContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Prog_Type_AccessContext* PLCSTParser::Prog_ConfigContext::prog_Type_Access() {
  return getRuleContext<PLCSTParser::Prog_Type_AccessContext>(0);
}

tree::TerminalNode* PLCSTParser::Prog_ConfigContext::WITH() {
  return getToken(PLCSTParser::WITH, 0);
}

PLCSTParser::Task_NameContext* PLCSTParser::Prog_ConfigContext::task_Name() {
  return getRuleContext<PLCSTParser::Task_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Prog_ConfigContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

PLCSTParser::Prog_Conf_ElemsContext* PLCSTParser::Prog_ConfigContext::prog_Conf_Elems() {
  return getRuleContext<PLCSTParser::Prog_Conf_ElemsContext>(0);
}

tree::TerminalNode* PLCSTParser::Prog_ConfigContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

tree::TerminalNode* PLCSTParser::Prog_ConfigContext::RETAIN() {
  return getToken(PLCSTParser::RETAIN, 0);
}

tree::TerminalNode* PLCSTParser::Prog_ConfigContext::NON_RETAIN() {
  return getToken(PLCSTParser::NON_RETAIN, 0);
}


size_t PLCSTParser::Prog_ConfigContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Config;
}

void PLCSTParser::Prog_ConfigContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Config(this);
}

void PLCSTParser::Prog_ConfigContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Config(this);
}


std::any PLCSTParser::Prog_ConfigContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Config(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_ConfigContext* PLCSTParser::prog_Config() {
  Prog_ConfigContext *_localctx = _tracker.createInstance<Prog_ConfigContext>(_ctx, getState());
  enterRule(_localctx, 324, PLCSTParser::RuleProg_Config);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1884);
    match(PLCSTParser::PROGRAM);
    setState(1886);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::RETAIN

    || _la == PLCSTParser::NON_RETAIN) {
      setState(1885);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::RETAIN

      || _la == PLCSTParser::NON_RETAIN)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1888);
    prog_Name();
    setState(1891);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::WITH) {
      setState(1889);
      match(PLCSTParser::WITH);
      setState(1890);
      task_Name();
    }
    setState(1893);
    match(PLCSTParser::Colon);
    setState(1894);
    prog_Type_Access();
    setState(1899);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::LeftParen) {
      setState(1895);
      match(PLCSTParser::LeftParen);
      setState(1896);
      prog_Conf_Elems();
      setState(1897);
      match(PLCSTParser::RightParen);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_Conf_ElemsContext ------------------------------------------------------------------

PLCSTParser::Prog_Conf_ElemsContext::Prog_Conf_ElemsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Prog_Conf_ElemContext *> PLCSTParser::Prog_Conf_ElemsContext::prog_Conf_Elem() {
  return getRuleContexts<PLCSTParser::Prog_Conf_ElemContext>();
}

PLCSTParser::Prog_Conf_ElemContext* PLCSTParser::Prog_Conf_ElemsContext::prog_Conf_Elem(size_t i) {
  return getRuleContext<PLCSTParser::Prog_Conf_ElemContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Prog_Conf_ElemsContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Prog_Conf_ElemsContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Prog_Conf_ElemsContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Conf_Elems;
}

void PLCSTParser::Prog_Conf_ElemsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Conf_Elems(this);
}

void PLCSTParser::Prog_Conf_ElemsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Conf_Elems(this);
}


std::any PLCSTParser::Prog_Conf_ElemsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Conf_Elems(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_Conf_ElemsContext* PLCSTParser::prog_Conf_Elems() {
  Prog_Conf_ElemsContext *_localctx = _tracker.createInstance<Prog_Conf_ElemsContext>(_ctx, getState());
  enterRule(_localctx, 326, PLCSTParser::RuleProg_Conf_Elems);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1901);
    prog_Conf_Elem();
    setState(1906);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(1902);
      match(PLCSTParser::Comma);
      setState(1903);
      prog_Conf_Elem();
      setState(1908);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_Conf_ElemContext ------------------------------------------------------------------

PLCSTParser::Prog_Conf_ElemContext::Prog_Conf_ElemContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::FB_TaskContext* PLCSTParser::Prog_Conf_ElemContext::fB_Task() {
  return getRuleContext<PLCSTParser::FB_TaskContext>(0);
}

PLCSTParser::Prog_CnxnContext* PLCSTParser::Prog_Conf_ElemContext::prog_Cnxn() {
  return getRuleContext<PLCSTParser::Prog_CnxnContext>(0);
}


size_t PLCSTParser::Prog_Conf_ElemContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Conf_Elem;
}

void PLCSTParser::Prog_Conf_ElemContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Conf_Elem(this);
}

void PLCSTParser::Prog_Conf_ElemContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Conf_Elem(this);
}


std::any PLCSTParser::Prog_Conf_ElemContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Conf_Elem(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_Conf_ElemContext* PLCSTParser::prog_Conf_Elem() {
  Prog_Conf_ElemContext *_localctx = _tracker.createInstance<Prog_Conf_ElemContext>(_ctx, getState());
  enterRule(_localctx, 328, PLCSTParser::RuleProg_Conf_Elem);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1911);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 206, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1909);
      fB_Task();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1910);
      prog_Cnxn();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_TaskContext ------------------------------------------------------------------

PLCSTParser::FB_TaskContext::FB_TaskContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::FB_Instance_NameContext* PLCSTParser::FB_TaskContext::fB_Instance_Name() {
  return getRuleContext<PLCSTParser::FB_Instance_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::FB_TaskContext::WITH() {
  return getToken(PLCSTParser::WITH, 0);
}

PLCSTParser::Task_NameContext* PLCSTParser::FB_TaskContext::task_Name() {
  return getRuleContext<PLCSTParser::Task_NameContext>(0);
}


size_t PLCSTParser::FB_TaskContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Task;
}

void PLCSTParser::FB_TaskContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Task(this);
}

void PLCSTParser::FB_TaskContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Task(this);
}


std::any PLCSTParser::FB_TaskContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Task(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_TaskContext* PLCSTParser::fB_Task() {
  FB_TaskContext *_localctx = _tracker.createInstance<FB_TaskContext>(_ctx, getState());
  enterRule(_localctx, 330, PLCSTParser::RuleFB_Task);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1913);
    fB_Instance_Name();
    setState(1914);
    match(PLCSTParser::WITH);
    setState(1915);
    task_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_CnxnContext ------------------------------------------------------------------

PLCSTParser::Prog_CnxnContext::Prog_CnxnContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Symbolic_VariableContext* PLCSTParser::Prog_CnxnContext::symbolic_Variable() {
  return getRuleContext<PLCSTParser::Symbolic_VariableContext>(0);
}

tree::TerminalNode* PLCSTParser::Prog_CnxnContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Prog_Data_SourceContext* PLCSTParser::Prog_CnxnContext::prog_Data_Source() {
  return getRuleContext<PLCSTParser::Prog_Data_SourceContext>(0);
}

tree::TerminalNode* PLCSTParser::Prog_CnxnContext::LeftAssign() {
  return getToken(PLCSTParser::LeftAssign, 0);
}

PLCSTParser::Data_SinkContext* PLCSTParser::Prog_CnxnContext::data_Sink() {
  return getRuleContext<PLCSTParser::Data_SinkContext>(0);
}


size_t PLCSTParser::Prog_CnxnContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Cnxn;
}

void PLCSTParser::Prog_CnxnContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Cnxn(this);
}

void PLCSTParser::Prog_CnxnContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Cnxn(this);
}


std::any PLCSTParser::Prog_CnxnContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Cnxn(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_CnxnContext* PLCSTParser::prog_Cnxn() {
  Prog_CnxnContext *_localctx = _tracker.createInstance<Prog_CnxnContext>(_ctx, getState());
  enterRule(_localctx, 332, PLCSTParser::RuleProg_Cnxn);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1925);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 207, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1917);
      symbolic_Variable();
      setState(1918);
      match(PLCSTParser::Assign);
      setState(1919);
      prog_Data_Source();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1921);
      symbolic_Variable();
      setState(1922);
      match(PLCSTParser::LeftAssign);
      setState(1923);
      data_Sink();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_Data_SourceContext ------------------------------------------------------------------

PLCSTParser::Prog_Data_SourceContext::Prog_Data_SourceContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::ConstantContext* PLCSTParser::Prog_Data_SourceContext::constant() {
  return getRuleContext<PLCSTParser::ConstantContext>(0);
}

PLCSTParser::Enum_ValueContext* PLCSTParser::Prog_Data_SourceContext::enum_Value() {
  return getRuleContext<PLCSTParser::Enum_ValueContext>(0);
}

PLCSTParser::Global_Var_AccessContext* PLCSTParser::Prog_Data_SourceContext::global_Var_Access() {
  return getRuleContext<PLCSTParser::Global_Var_AccessContext>(0);
}

tree::TerminalNode* PLCSTParser::Prog_Data_SourceContext::Direct_Variable() {
  return getToken(PLCSTParser::Direct_Variable, 0);
}


size_t PLCSTParser::Prog_Data_SourceContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Data_Source;
}

void PLCSTParser::Prog_Data_SourceContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Data_Source(this);
}

void PLCSTParser::Prog_Data_SourceContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Data_Source(this);
}


std::any PLCSTParser::Prog_Data_SourceContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Data_Source(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_Data_SourceContext* PLCSTParser::prog_Data_Source() {
  Prog_Data_SourceContext *_localctx = _tracker.createInstance<Prog_Data_SourceContext>(_ctx, getState());
  enterRule(_localctx, 334, PLCSTParser::RuleProg_Data_Source);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1931);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 208, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1927);
      constant();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1928);
      enum_Value();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(1929);
      global_Var_Access();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(1930);
      match(PLCSTParser::Direct_Variable);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Data_SinkContext ------------------------------------------------------------------

PLCSTParser::Data_SinkContext::Data_SinkContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Global_Var_AccessContext* PLCSTParser::Data_SinkContext::global_Var_Access() {
  return getRuleContext<PLCSTParser::Global_Var_AccessContext>(0);
}

tree::TerminalNode* PLCSTParser::Data_SinkContext::Direct_Variable() {
  return getToken(PLCSTParser::Direct_Variable, 0);
}


size_t PLCSTParser::Data_SinkContext::getRuleIndex() const {
  return PLCSTParser::RuleData_Sink;
}

void PLCSTParser::Data_SinkContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterData_Sink(this);
}

void PLCSTParser::Data_SinkContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitData_Sink(this);
}


std::any PLCSTParser::Data_SinkContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitData_Sink(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Data_SinkContext* PLCSTParser::data_Sink() {
  Data_SinkContext *_localctx = _tracker.createInstance<Data_SinkContext>(_ctx, getState());
  enterRule(_localctx, 336, PLCSTParser::RuleData_Sink);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1935);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::Identifier: {
        enterOuterAlt(_localctx, 1);
        setState(1933);
        global_Var_Access();
        break;
      }

      case PLCSTParser::Direct_Variable: {
        enterOuterAlt(_localctx, 2);
        setState(1934);
        match(PLCSTParser::Direct_Variable);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Config_InitContext ------------------------------------------------------------------

PLCSTParser::Config_InitContext::Config_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Config_InitContext::VAR_CONFIG() {
  return getToken(PLCSTParser::VAR_CONFIG, 0);
}

tree::TerminalNode* PLCSTParser::Config_InitContext::END_VAR() {
  return getToken(PLCSTParser::END_VAR, 0);
}

std::vector<PLCSTParser::Config_Inst_InitContext *> PLCSTParser::Config_InitContext::config_Inst_Init() {
  return getRuleContexts<PLCSTParser::Config_Inst_InitContext>();
}

PLCSTParser::Config_Inst_InitContext* PLCSTParser::Config_InitContext::config_Inst_Init(size_t i) {
  return getRuleContext<PLCSTParser::Config_Inst_InitContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Config_InitContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Config_InitContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}


size_t PLCSTParser::Config_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleConfig_Init;
}

void PLCSTParser::Config_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConfig_Init(this);
}

void PLCSTParser::Config_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConfig_Init(this);
}


std::any PLCSTParser::Config_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitConfig_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Config_InitContext* PLCSTParser::config_Init() {
  Config_InitContext *_localctx = _tracker.createInstance<Config_InitContext>(_ctx, getState());
  enterRule(_localctx, 338, PLCSTParser::RuleConfig_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1937);
    match(PLCSTParser::VAR_CONFIG);
    setState(1943);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0) {
      setState(1938);
      config_Inst_Init();
      setState(1939);
      match(PLCSTParser::Semi);
      setState(1945);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1946);
    match(PLCSTParser::END_VAR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Config_Inst_InitContext ------------------------------------------------------------------

PLCSTParser::Config_Inst_InitContext::Config_Inst_InitContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Resource_NameContext* PLCSTParser::Config_Inst_InitContext::resource_Name() {
  return getRuleContext<PLCSTParser::Resource_NameContext>(0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Config_Inst_InitContext::Dot() {
  return getTokens(PLCSTParser::Dot);
}

tree::TerminalNode* PLCSTParser::Config_Inst_InitContext::Dot(size_t i) {
  return getToken(PLCSTParser::Dot, i);
}

PLCSTParser::Prog_NameContext* PLCSTParser::Config_Inst_InitContext::prog_Name() {
  return getRuleContext<PLCSTParser::Prog_NameContext>(0);
}

PLCSTParser::Variable_NameContext* PLCSTParser::Config_Inst_InitContext::variable_Name() {
  return getRuleContext<PLCSTParser::Variable_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Config_Inst_InitContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Loc_Var_Spec_InitContext* PLCSTParser::Config_Inst_InitContext::loc_Var_Spec_Init() {
  return getRuleContext<PLCSTParser::Loc_Var_Spec_InitContext>(0);
}

tree::TerminalNode* PLCSTParser::Config_Inst_InitContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::Struct_InitContext* PLCSTParser::Config_Inst_InitContext::struct_Init() {
  return getRuleContext<PLCSTParser::Struct_InitContext>(0);
}

std::vector<PLCSTParser::FB_Instance_NameContext *> PLCSTParser::Config_Inst_InitContext::fB_Instance_Name() {
  return getRuleContexts<PLCSTParser::FB_Instance_NameContext>();
}

PLCSTParser::FB_Instance_NameContext* PLCSTParser::Config_Inst_InitContext::fB_Instance_Name(size_t i) {
  return getRuleContext<PLCSTParser::FB_Instance_NameContext>(i);
}

std::vector<PLCSTParser::Class_Instance_NameContext *> PLCSTParser::Config_Inst_InitContext::class_Instance_Name() {
  return getRuleContexts<PLCSTParser::Class_Instance_NameContext>();
}

PLCSTParser::Class_Instance_NameContext* PLCSTParser::Config_Inst_InitContext::class_Instance_Name(size_t i) {
  return getRuleContext<PLCSTParser::Class_Instance_NameContext>(i);
}

PLCSTParser::Located_AtContext* PLCSTParser::Config_Inst_InitContext::located_At() {
  return getRuleContext<PLCSTParser::Located_AtContext>(0);
}

PLCSTParser::FB_Type_AccessContext* PLCSTParser::Config_Inst_InitContext::fB_Type_Access() {
  return getRuleContext<PLCSTParser::FB_Type_AccessContext>(0);
}

PLCSTParser::Class_Type_AccessContext* PLCSTParser::Config_Inst_InitContext::class_Type_Access() {
  return getRuleContext<PLCSTParser::Class_Type_AccessContext>(0);
}


size_t PLCSTParser::Config_Inst_InitContext::getRuleIndex() const {
  return PLCSTParser::RuleConfig_Inst_Init;
}

void PLCSTParser::Config_Inst_InitContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConfig_Inst_Init(this);
}

void PLCSTParser::Config_Inst_InitContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConfig_Inst_Init(this);
}


std::any PLCSTParser::Config_Inst_InitContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitConfig_Inst_Init(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Config_Inst_InitContext* PLCSTParser::config_Inst_Init() {
  Config_Inst_InitContext *_localctx = _tracker.createInstance<Config_Inst_InitContext>(_ctx, getState());
  enterRule(_localctx, 340, PLCSTParser::RuleConfig_Inst_Init);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1948);
    resource_Name();
    setState(1949);
    match(PLCSTParser::Dot);
    setState(1950);
    prog_Name();
    setState(1951);
    match(PLCSTParser::Dot);
    setState(1960);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 212, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1954);
        _errHandler->sync(this);
        switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 211, _ctx)) {
        case 1: {
          setState(1952);
          fB_Instance_Name();
          break;
        }

        case 2: {
          setState(1953);
          class_Instance_Name();
          break;
        }

        default:
          break;
        }
        setState(1956);
        match(PLCSTParser::Dot); 
      }
      setState(1962);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 212, _ctx);
    }
    setState(1983);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 215, _ctx)) {
    case 1: {
      setState(1963);
      variable_Name();
      setState(1965);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == PLCSTParser::AT) {
        setState(1964);
        located_At();
      }
      setState(1967);
      match(PLCSTParser::Colon);
      setState(1968);
      loc_Var_Spec_Init();
      break;
    }

    case 2: {
      setState(1978);
      _errHandler->sync(this);
      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 214, _ctx)) {
      case 1: {
        setState(1970);
        fB_Instance_Name();
        setState(1971);
        match(PLCSTParser::Colon);
        setState(1972);
        fB_Type_Access();
        break;
      }

      case 2: {
        setState(1974);
        class_Instance_Name();
        setState(1975);
        match(PLCSTParser::Colon);
        setState(1976);
        class_Type_Access();
        break;
      }

      default:
        break;
      }
      setState(1980);
      match(PLCSTParser::Assign);
      setState(1981);
      struct_Init();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Namespace_DeclContext ------------------------------------------------------------------

PLCSTParser::Namespace_DeclContext::Namespace_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Namespace_DeclContext::NAMESPACE() {
  return getToken(PLCSTParser::NAMESPACE, 0);
}

PLCSTParser::Namespace_H_NameContext* PLCSTParser::Namespace_DeclContext::namespace_H_Name() {
  return getRuleContext<PLCSTParser::Namespace_H_NameContext>(0);
}

PLCSTParser::Namespace_ElementsContext* PLCSTParser::Namespace_DeclContext::namespace_Elements() {
  return getRuleContext<PLCSTParser::Namespace_ElementsContext>(0);
}

tree::TerminalNode* PLCSTParser::Namespace_DeclContext::END_NAMESPACE() {
  return getToken(PLCSTParser::END_NAMESPACE, 0);
}

tree::TerminalNode* PLCSTParser::Namespace_DeclContext::INTERNAL() {
  return getToken(PLCSTParser::INTERNAL, 0);
}

std::vector<PLCSTParser::Using_DirectiveContext *> PLCSTParser::Namespace_DeclContext::using_Directive() {
  return getRuleContexts<PLCSTParser::Using_DirectiveContext>();
}

PLCSTParser::Using_DirectiveContext* PLCSTParser::Namespace_DeclContext::using_Directive(size_t i) {
  return getRuleContext<PLCSTParser::Using_DirectiveContext>(i);
}


size_t PLCSTParser::Namespace_DeclContext::getRuleIndex() const {
  return PLCSTParser::RuleNamespace_Decl;
}

void PLCSTParser::Namespace_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNamespace_Decl(this);
}

void PLCSTParser::Namespace_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNamespace_Decl(this);
}


std::any PLCSTParser::Namespace_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNamespace_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Namespace_DeclContext* PLCSTParser::namespace_Decl() {
  Namespace_DeclContext *_localctx = _tracker.createInstance<Namespace_DeclContext>(_ctx, getState());
  enterRule(_localctx, 342, PLCSTParser::RuleNamespace_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1985);
    match(PLCSTParser::NAMESPACE);
    setState(1987);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::INTERNAL) {
      setState(1986);
      match(PLCSTParser::INTERNAL);
    }
    setState(1989);
    namespace_H_Name();
    setState(1993);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::USING) {
      setState(1990);
      using_Directive();
      setState(1995);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1996);
    namespace_Elements();
    setState(1997);
    match(PLCSTParser::END_NAMESPACE);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Namespace_ElementsContext ------------------------------------------------------------------

PLCSTParser::Namespace_ElementsContext::Namespace_ElementsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Data_Type_DeclContext *> PLCSTParser::Namespace_ElementsContext::data_Type_Decl() {
  return getRuleContexts<PLCSTParser::Data_Type_DeclContext>();
}

PLCSTParser::Data_Type_DeclContext* PLCSTParser::Namespace_ElementsContext::data_Type_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Data_Type_DeclContext>(i);
}

std::vector<PLCSTParser::Func_DeclContext *> PLCSTParser::Namespace_ElementsContext::func_Decl() {
  return getRuleContexts<PLCSTParser::Func_DeclContext>();
}

PLCSTParser::Func_DeclContext* PLCSTParser::Namespace_ElementsContext::func_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Func_DeclContext>(i);
}

std::vector<PLCSTParser::FB_DeclContext *> PLCSTParser::Namespace_ElementsContext::fB_Decl() {
  return getRuleContexts<PLCSTParser::FB_DeclContext>();
}

PLCSTParser::FB_DeclContext* PLCSTParser::Namespace_ElementsContext::fB_Decl(size_t i) {
  return getRuleContext<PLCSTParser::FB_DeclContext>(i);
}

std::vector<PLCSTParser::Class_DeclContext *> PLCSTParser::Namespace_ElementsContext::class_Decl() {
  return getRuleContexts<PLCSTParser::Class_DeclContext>();
}

PLCSTParser::Class_DeclContext* PLCSTParser::Namespace_ElementsContext::class_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Class_DeclContext>(i);
}

std::vector<PLCSTParser::Interface_DeclContext *> PLCSTParser::Namespace_ElementsContext::interface_Decl() {
  return getRuleContexts<PLCSTParser::Interface_DeclContext>();
}

PLCSTParser::Interface_DeclContext* PLCSTParser::Namespace_ElementsContext::interface_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Interface_DeclContext>(i);
}

std::vector<PLCSTParser::Namespace_DeclContext *> PLCSTParser::Namespace_ElementsContext::namespace_Decl() {
  return getRuleContexts<PLCSTParser::Namespace_DeclContext>();
}

PLCSTParser::Namespace_DeclContext* PLCSTParser::Namespace_ElementsContext::namespace_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Namespace_DeclContext>(i);
}


size_t PLCSTParser::Namespace_ElementsContext::getRuleIndex() const {
  return PLCSTParser::RuleNamespace_Elements;
}

void PLCSTParser::Namespace_ElementsContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNamespace_Elements(this);
}

void PLCSTParser::Namespace_ElementsContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNamespace_Elements(this);
}


std::any PLCSTParser::Namespace_ElementsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNamespace_Elements(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Namespace_ElementsContext* PLCSTParser::namespace_Elements() {
  Namespace_ElementsContext *_localctx = _tracker.createInstance<Namespace_ElementsContext>(_ctx, getState());
  enterRule(_localctx, 344, PLCSTParser::RuleNamespace_Elements);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2005); 
    _errHandler->sync(this);
    _la = _input->LA(1);
    do {
      setState(2005);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case PLCSTParser::TYPE: {
          setState(1999);
          data_Type_Decl();
          break;
        }

        case PLCSTParser::FUNCTION: {
          setState(2000);
          func_Decl();
          break;
        }

        case PLCSTParser::FUNCTION_BLOCK: {
          setState(2001);
          fB_Decl();
          break;
        }

        case PLCSTParser::CLASS: {
          setState(2002);
          class_Decl();
          break;
        }

        case PLCSTParser::INTERFACE: {
          setState(2003);
          interface_Decl();
          break;
        }

        case PLCSTParser::NAMESPACE: {
          setState(2004);
          namespace_Decl();
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(2007); 
      _errHandler->sync(this);
      _la = _input->LA(1);
    } while (_la == PLCSTParser::TYPE || (((_la - 70) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 70)) & 17592186064905) != 0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Namespace_H_NameContext ------------------------------------------------------------------

PLCSTParser::Namespace_H_NameContext::Namespace_H_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Namespace_NameContext *> PLCSTParser::Namespace_H_NameContext::namespace_Name() {
  return getRuleContexts<PLCSTParser::Namespace_NameContext>();
}

PLCSTParser::Namespace_NameContext* PLCSTParser::Namespace_H_NameContext::namespace_Name(size_t i) {
  return getRuleContext<PLCSTParser::Namespace_NameContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Namespace_H_NameContext::Dot() {
  return getTokens(PLCSTParser::Dot);
}

tree::TerminalNode* PLCSTParser::Namespace_H_NameContext::Dot(size_t i) {
  return getToken(PLCSTParser::Dot, i);
}


size_t PLCSTParser::Namespace_H_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleNamespace_H_Name;
}

void PLCSTParser::Namespace_H_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNamespace_H_Name(this);
}

void PLCSTParser::Namespace_H_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNamespace_H_Name(this);
}


std::any PLCSTParser::Namespace_H_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNamespace_H_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Namespace_H_NameContext* PLCSTParser::namespace_H_Name() {
  Namespace_H_NameContext *_localctx = _tracker.createInstance<Namespace_H_NameContext>(_ctx, getState());
  enterRule(_localctx, 346, PLCSTParser::RuleNamespace_H_Name);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2009);
    namespace_Name();
    setState(2014);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Dot) {
      setState(2010);
      match(PLCSTParser::Dot);
      setState(2011);
      namespace_Name();
      setState(2016);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Using_DirectiveContext ------------------------------------------------------------------

PLCSTParser::Using_DirectiveContext::Using_DirectiveContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Using_DirectiveContext::USING() {
  return getToken(PLCSTParser::USING, 0);
}

std::vector<PLCSTParser::Namespace_H_NameContext *> PLCSTParser::Using_DirectiveContext::namespace_H_Name() {
  return getRuleContexts<PLCSTParser::Namespace_H_NameContext>();
}

PLCSTParser::Namespace_H_NameContext* PLCSTParser::Using_DirectiveContext::namespace_H_Name(size_t i) {
  return getRuleContext<PLCSTParser::Namespace_H_NameContext>(i);
}

tree::TerminalNode* PLCSTParser::Using_DirectiveContext::Semi() {
  return getToken(PLCSTParser::Semi, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Using_DirectiveContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Using_DirectiveContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Using_DirectiveContext::getRuleIndex() const {
  return PLCSTParser::RuleUsing_Directive;
}

void PLCSTParser::Using_DirectiveContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUsing_Directive(this);
}

void PLCSTParser::Using_DirectiveContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUsing_Directive(this);
}


std::any PLCSTParser::Using_DirectiveContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitUsing_Directive(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Using_DirectiveContext* PLCSTParser::using_Directive() {
  Using_DirectiveContext *_localctx = _tracker.createInstance<Using_DirectiveContext>(_ctx, getState());
  enterRule(_localctx, 348, PLCSTParser::RuleUsing_Directive);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2017);
    match(PLCSTParser::USING);
    setState(2018);
    namespace_H_Name();
    setState(2023);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(2019);
      match(PLCSTParser::Comma);
      setState(2020);
      namespace_H_Name();
      setState(2025);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(2026);
    match(PLCSTParser::Semi);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- POU_DeclContext ------------------------------------------------------------------

PLCSTParser::POU_DeclContext::POU_DeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Using_DirectiveContext *> PLCSTParser::POU_DeclContext::using_Directive() {
  return getRuleContexts<PLCSTParser::Using_DirectiveContext>();
}

PLCSTParser::Using_DirectiveContext* PLCSTParser::POU_DeclContext::using_Directive(size_t i) {
  return getRuleContext<PLCSTParser::Using_DirectiveContext>(i);
}

std::vector<PLCSTParser::Global_Var_DeclsContext *> PLCSTParser::POU_DeclContext::global_Var_Decls() {
  return getRuleContexts<PLCSTParser::Global_Var_DeclsContext>();
}

PLCSTParser::Global_Var_DeclsContext* PLCSTParser::POU_DeclContext::global_Var_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Global_Var_DeclsContext>(i);
}

std::vector<PLCSTParser::Data_Type_DeclContext *> PLCSTParser::POU_DeclContext::data_Type_Decl() {
  return getRuleContexts<PLCSTParser::Data_Type_DeclContext>();
}

PLCSTParser::Data_Type_DeclContext* PLCSTParser::POU_DeclContext::data_Type_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Data_Type_DeclContext>(i);
}

std::vector<PLCSTParser::Access_DeclsContext *> PLCSTParser::POU_DeclContext::access_Decls() {
  return getRuleContexts<PLCSTParser::Access_DeclsContext>();
}

PLCSTParser::Access_DeclsContext* PLCSTParser::POU_DeclContext::access_Decls(size_t i) {
  return getRuleContext<PLCSTParser::Access_DeclsContext>(i);
}

std::vector<PLCSTParser::Func_DeclContext *> PLCSTParser::POU_DeclContext::func_Decl() {
  return getRuleContexts<PLCSTParser::Func_DeclContext>();
}

PLCSTParser::Func_DeclContext* PLCSTParser::POU_DeclContext::func_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Func_DeclContext>(i);
}

std::vector<PLCSTParser::FB_DeclContext *> PLCSTParser::POU_DeclContext::fB_Decl() {
  return getRuleContexts<PLCSTParser::FB_DeclContext>();
}

PLCSTParser::FB_DeclContext* PLCSTParser::POU_DeclContext::fB_Decl(size_t i) {
  return getRuleContext<PLCSTParser::FB_DeclContext>(i);
}

std::vector<PLCSTParser::Class_DeclContext *> PLCSTParser::POU_DeclContext::class_Decl() {
  return getRuleContexts<PLCSTParser::Class_DeclContext>();
}

PLCSTParser::Class_DeclContext* PLCSTParser::POU_DeclContext::class_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Class_DeclContext>(i);
}

std::vector<PLCSTParser::Interface_DeclContext *> PLCSTParser::POU_DeclContext::interface_Decl() {
  return getRuleContexts<PLCSTParser::Interface_DeclContext>();
}

PLCSTParser::Interface_DeclContext* PLCSTParser::POU_DeclContext::interface_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Interface_DeclContext>(i);
}

std::vector<PLCSTParser::Namespace_DeclContext *> PLCSTParser::POU_DeclContext::namespace_Decl() {
  return getRuleContexts<PLCSTParser::Namespace_DeclContext>();
}

PLCSTParser::Namespace_DeclContext* PLCSTParser::POU_DeclContext::namespace_Decl(size_t i) {
  return getRuleContext<PLCSTParser::Namespace_DeclContext>(i);
}


size_t PLCSTParser::POU_DeclContext::getRuleIndex() const {
  return PLCSTParser::RulePOU_Decl;
}

void PLCSTParser::POU_DeclContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterPOU_Decl(this);
}

void PLCSTParser::POU_DeclContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitPOU_Decl(this);
}


std::any PLCSTParser::POU_DeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitPOU_Decl(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::POU_DeclContext* PLCSTParser::pOU_Decl() {
  POU_DeclContext *_localctx = _tracker.createInstance<POU_DeclContext>(_ctx, getState());
  enterRule(_localctx, 350, PLCSTParser::RulePOU_Decl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(2031);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::USING) {
      setState(2028);
      using_Directive();
      setState(2033);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(2042); 
    _errHandler->sync(this);
    alt = 1;
    do {
      switch (alt) {
        case 1: {
              setState(2042);
              _errHandler->sync(this);
              switch (_input->LA(1)) {
                case PLCSTParser::VAR_GLOBAL: {
                  setState(2034);
                  global_Var_Decls();
                  break;
                }

                case PLCSTParser::TYPE: {
                  setState(2035);
                  data_Type_Decl();
                  break;
                }

                case PLCSTParser::VAR_ACCESS: {
                  setState(2036);
                  access_Decls();
                  break;
                }

                case PLCSTParser::FUNCTION: {
                  setState(2037);
                  func_Decl();
                  break;
                }

                case PLCSTParser::FUNCTION_BLOCK: {
                  setState(2038);
                  fB_Decl();
                  break;
                }

                case PLCSTParser::CLASS: {
                  setState(2039);
                  class_Decl();
                  break;
                }

                case PLCSTParser::INTERFACE: {
                  setState(2040);
                  interface_Decl();
                  break;
                }

                case PLCSTParser::NAMESPACE: {
                  setState(2041);
                  namespace_Decl();
                  break;
                }

              default:
                throw NoViableAltException(this);
              }
              break;
            }

      default:
        throw NoViableAltException(this);
      }
      setState(2044); 
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 224, _ctx);
    } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ExpressionContext ------------------------------------------------------------------

PLCSTParser::ExpressionContext::ExpressionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Xor_ExprContext *> PLCSTParser::ExpressionContext::xor_Expr() {
  return getRuleContexts<PLCSTParser::Xor_ExprContext>();
}

PLCSTParser::Xor_ExprContext* PLCSTParser::ExpressionContext::xor_Expr(size_t i) {
  return getRuleContext<PLCSTParser::Xor_ExprContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::ExpressionContext::OR() {
  return getTokens(PLCSTParser::OR);
}

tree::TerminalNode* PLCSTParser::ExpressionContext::OR(size_t i) {
  return getToken(PLCSTParser::OR, i);
}


size_t PLCSTParser::ExpressionContext::getRuleIndex() const {
  return PLCSTParser::RuleExpression;
}

void PLCSTParser::ExpressionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterExpression(this);
}

void PLCSTParser::ExpressionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitExpression(this);
}


std::any PLCSTParser::ExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitExpression(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::ExpressionContext* PLCSTParser::expression() {
  ExpressionContext *_localctx = _tracker.createInstance<ExpressionContext>(_ctx, getState());
  enterRule(_localctx, 352, PLCSTParser::RuleExpression);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2046);
    xor_Expr();
    setState(2051);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::OR) {
      setState(2047);
      match(PLCSTParser::OR);
      setState(2048);
      xor_Expr();
      setState(2053);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Constant_ExprContext ------------------------------------------------------------------

PLCSTParser::Constant_ExprContext::Constant_ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::ExpressionContext* PLCSTParser::Constant_ExprContext::expression() {
  return getRuleContext<PLCSTParser::ExpressionContext>(0);
}


size_t PLCSTParser::Constant_ExprContext::getRuleIndex() const {
  return PLCSTParser::RuleConstant_Expr;
}

void PLCSTParser::Constant_ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConstant_Expr(this);
}

void PLCSTParser::Constant_ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConstant_Expr(this);
}


std::any PLCSTParser::Constant_ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitConstant_Expr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Constant_ExprContext* PLCSTParser::constant_Expr() {
  Constant_ExprContext *_localctx = _tracker.createInstance<Constant_ExprContext>(_ctx, getState());
  enterRule(_localctx, 354, PLCSTParser::RuleConstant_Expr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2054);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Xor_ExprContext ------------------------------------------------------------------

PLCSTParser::Xor_ExprContext::Xor_ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::And_ExprContext *> PLCSTParser::Xor_ExprContext::and_Expr() {
  return getRuleContexts<PLCSTParser::And_ExprContext>();
}

PLCSTParser::And_ExprContext* PLCSTParser::Xor_ExprContext::and_Expr(size_t i) {
  return getRuleContext<PLCSTParser::And_ExprContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Xor_ExprContext::XOR() {
  return getTokens(PLCSTParser::XOR);
}

tree::TerminalNode* PLCSTParser::Xor_ExprContext::XOR(size_t i) {
  return getToken(PLCSTParser::XOR, i);
}


size_t PLCSTParser::Xor_ExprContext::getRuleIndex() const {
  return PLCSTParser::RuleXor_Expr;
}

void PLCSTParser::Xor_ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterXor_Expr(this);
}

void PLCSTParser::Xor_ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitXor_Expr(this);
}


std::any PLCSTParser::Xor_ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitXor_Expr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Xor_ExprContext* PLCSTParser::xor_Expr() {
  Xor_ExprContext *_localctx = _tracker.createInstance<Xor_ExprContext>(_ctx, getState());
  enterRule(_localctx, 356, PLCSTParser::RuleXor_Expr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2056);
    and_Expr();
    setState(2061);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::XOR) {
      setState(2057);
      match(PLCSTParser::XOR);
      setState(2058);
      and_Expr();
      setState(2063);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- And_ExprContext ------------------------------------------------------------------

PLCSTParser::And_ExprContext::And_ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Compare_ExprContext *> PLCSTParser::And_ExprContext::compare_Expr() {
  return getRuleContexts<PLCSTParser::Compare_ExprContext>();
}

PLCSTParser::Compare_ExprContext* PLCSTParser::And_ExprContext::compare_Expr(size_t i) {
  return getRuleContext<PLCSTParser::Compare_ExprContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::And_ExprContext::AndSign() {
  return getTokens(PLCSTParser::AndSign);
}

tree::TerminalNode* PLCSTParser::And_ExprContext::AndSign(size_t i) {
  return getToken(PLCSTParser::AndSign, i);
}

std::vector<tree::TerminalNode *> PLCSTParser::And_ExprContext::AND() {
  return getTokens(PLCSTParser::AND);
}

tree::TerminalNode* PLCSTParser::And_ExprContext::AND(size_t i) {
  return getToken(PLCSTParser::AND, i);
}


size_t PLCSTParser::And_ExprContext::getRuleIndex() const {
  return PLCSTParser::RuleAnd_Expr;
}

void PLCSTParser::And_ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAnd_Expr(this);
}

void PLCSTParser::And_ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAnd_Expr(this);
}


std::any PLCSTParser::And_ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAnd_Expr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::And_ExprContext* PLCSTParser::and_Expr() {
  And_ExprContext *_localctx = _tracker.createInstance<And_ExprContext>(_ctx, getState());
  enterRule(_localctx, 358, PLCSTParser::RuleAnd_Expr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2064);
    compare_Expr();
    setState(2069);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::AND

    || _la == PLCSTParser::AndSign) {
      setState(2065);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::AND

      || _la == PLCSTParser::AndSign)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
      setState(2066);
      compare_Expr();
      setState(2071);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Compare_ExprContext ------------------------------------------------------------------

PLCSTParser::Compare_ExprContext::Compare_ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Equ_ExprContext *> PLCSTParser::Compare_ExprContext::equ_Expr() {
  return getRuleContexts<PLCSTParser::Equ_ExprContext>();
}

PLCSTParser::Equ_ExprContext* PLCSTParser::Compare_ExprContext::equ_Expr(size_t i) {
  return getRuleContext<PLCSTParser::Equ_ExprContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Compare_ExprContext::Equal() {
  return getTokens(PLCSTParser::Equal);
}

tree::TerminalNode* PLCSTParser::Compare_ExprContext::Equal(size_t i) {
  return getToken(PLCSTParser::Equal, i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Compare_ExprContext::NotEqual() {
  return getTokens(PLCSTParser::NotEqual);
}

tree::TerminalNode* PLCSTParser::Compare_ExprContext::NotEqual(size_t i) {
  return getToken(PLCSTParser::NotEqual, i);
}


size_t PLCSTParser::Compare_ExprContext::getRuleIndex() const {
  return PLCSTParser::RuleCompare_Expr;
}

void PLCSTParser::Compare_ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCompare_Expr(this);
}

void PLCSTParser::Compare_ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCompare_Expr(this);
}


std::any PLCSTParser::Compare_ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitCompare_Expr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Compare_ExprContext* PLCSTParser::compare_Expr() {
  Compare_ExprContext *_localctx = _tracker.createInstance<Compare_ExprContext>(_ctx, getState());
  enterRule(_localctx, 360, PLCSTParser::RuleCompare_Expr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2072);
    equ_Expr();
    setState(2077);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Equal

    || _la == PLCSTParser::NotEqual) {
      setState(2073);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::Equal

      || _la == PLCSTParser::NotEqual)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
      setState(2074);
      equ_Expr();
      setState(2079);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Equ_ExprContext ------------------------------------------------------------------

PLCSTParser::Equ_ExprContext::Equ_ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Add_ExprContext *> PLCSTParser::Equ_ExprContext::add_Expr() {
  return getRuleContexts<PLCSTParser::Add_ExprContext>();
}

PLCSTParser::Add_ExprContext* PLCSTParser::Equ_ExprContext::add_Expr(size_t i) {
  return getRuleContext<PLCSTParser::Add_ExprContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Equ_ExprContext::Less() {
  return getTokens(PLCSTParser::Less);
}

tree::TerminalNode* PLCSTParser::Equ_ExprContext::Less(size_t i) {
  return getToken(PLCSTParser::Less, i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Equ_ExprContext::Greater() {
  return getTokens(PLCSTParser::Greater);
}

tree::TerminalNode* PLCSTParser::Equ_ExprContext::Greater(size_t i) {
  return getToken(PLCSTParser::Greater, i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Equ_ExprContext::LessEqual() {
  return getTokens(PLCSTParser::LessEqual);
}

tree::TerminalNode* PLCSTParser::Equ_ExprContext::LessEqual(size_t i) {
  return getToken(PLCSTParser::LessEqual, i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Equ_ExprContext::GreaterEqual() {
  return getTokens(PLCSTParser::GreaterEqual);
}

tree::TerminalNode* PLCSTParser::Equ_ExprContext::GreaterEqual(size_t i) {
  return getToken(PLCSTParser::GreaterEqual, i);
}


size_t PLCSTParser::Equ_ExprContext::getRuleIndex() const {
  return PLCSTParser::RuleEqu_Expr;
}

void PLCSTParser::Equ_ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterEqu_Expr(this);
}

void PLCSTParser::Equ_ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitEqu_Expr(this);
}


std::any PLCSTParser::Equ_ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitEqu_Expr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Equ_ExprContext* PLCSTParser::equ_Expr() {
  Equ_ExprContext *_localctx = _tracker.createInstance<Equ_ExprContext>(_ctx, getState());
  enterRule(_localctx, 362, PLCSTParser::RuleEqu_Expr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2080);
    add_Expr();
    setState(2085);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 167) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 167)) & 15) != 0) {
      setState(2081);
      _la = _input->LA(1);
      if (!((((_la - 167) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 167)) & 15) != 0)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
      setState(2082);
      add_Expr();
      setState(2087);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Add_ExprContext ------------------------------------------------------------------

PLCSTParser::Add_ExprContext::Add_ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::TermContext *> PLCSTParser::Add_ExprContext::term() {
  return getRuleContexts<PLCSTParser::TermContext>();
}

PLCSTParser::TermContext* PLCSTParser::Add_ExprContext::term(size_t i) {
  return getRuleContext<PLCSTParser::TermContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Add_ExprContext::Plus() {
  return getTokens(PLCSTParser::Plus);
}

tree::TerminalNode* PLCSTParser::Add_ExprContext::Plus(size_t i) {
  return getToken(PLCSTParser::Plus, i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Add_ExprContext::Minus() {
  return getTokens(PLCSTParser::Minus);
}

tree::TerminalNode* PLCSTParser::Add_ExprContext::Minus(size_t i) {
  return getToken(PLCSTParser::Minus, i);
}


size_t PLCSTParser::Add_ExprContext::getRuleIndex() const {
  return PLCSTParser::RuleAdd_Expr;
}

void PLCSTParser::Add_ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAdd_Expr(this);
}

void PLCSTParser::Add_ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAdd_Expr(this);
}


std::any PLCSTParser::Add_ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAdd_Expr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Add_ExprContext* PLCSTParser::add_Expr() {
  Add_ExprContext *_localctx = _tracker.createInstance<Add_ExprContext>(_ctx, getState());
  enterRule(_localctx, 364, PLCSTParser::RuleAdd_Expr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2088);
    term();
    setState(2093);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Plus

    || _la == PLCSTParser::Minus) {
      setState(2089);
      _la = _input->LA(1);
      if (!(_la == PLCSTParser::Plus

      || _la == PLCSTParser::Minus)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
      setState(2090);
      term();
      setState(2095);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TermContext ------------------------------------------------------------------

PLCSTParser::TermContext::TermContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Power_ExprContext *> PLCSTParser::TermContext::power_Expr() {
  return getRuleContexts<PLCSTParser::Power_ExprContext>();
}

PLCSTParser::Power_ExprContext* PLCSTParser::TermContext::power_Expr(size_t i) {
  return getRuleContext<PLCSTParser::Power_ExprContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::TermContext::Star() {
  return getTokens(PLCSTParser::Star);
}

tree::TerminalNode* PLCSTParser::TermContext::Star(size_t i) {
  return getToken(PLCSTParser::Star, i);
}

std::vector<tree::TerminalNode *> PLCSTParser::TermContext::Div() {
  return getTokens(PLCSTParser::Div);
}

tree::TerminalNode* PLCSTParser::TermContext::Div(size_t i) {
  return getToken(PLCSTParser::Div, i);
}

std::vector<tree::TerminalNode *> PLCSTParser::TermContext::MOD() {
  return getTokens(PLCSTParser::MOD);
}

tree::TerminalNode* PLCSTParser::TermContext::MOD(size_t i) {
  return getToken(PLCSTParser::MOD, i);
}


size_t PLCSTParser::TermContext::getRuleIndex() const {
  return PLCSTParser::RuleTerm;
}

void PLCSTParser::TermContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTerm(this);
}

void PLCSTParser::TermContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTerm(this);
}


std::any PLCSTParser::TermContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitTerm(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::TermContext* PLCSTParser::term() {
  TermContext *_localctx = _tracker.createInstance<TermContext>(_ctx, getState());
  enterRule(_localctx, 366, PLCSTParser::RuleTerm);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2096);
    power_Expr();
    setState(2103);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la - 121) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 121)) & 40532396646334465) != 0) {
      setState(2101);
      _errHandler->sync(this);
      switch (_input->LA(1)) {
        case PLCSTParser::Star: {
          setState(2097);
          match(PLCSTParser::Star);
          break;
        }

        case PLCSTParser::Div: {
          setState(2098);
          match(PLCSTParser::Div);
          break;
        }

        case PLCSTParser::MOD: {
          setState(2099);
          match(PLCSTParser::MOD);
          setState(2100);
          power_Expr();
          break;
        }

      default:
        throw NoViableAltException(this);
      }
      setState(2105);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Power_ExprContext ------------------------------------------------------------------

PLCSTParser::Power_ExprContext::Power_ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Unary_ExprContext *> PLCSTParser::Power_ExprContext::unary_Expr() {
  return getRuleContexts<PLCSTParser::Unary_ExprContext>();
}

PLCSTParser::Unary_ExprContext* PLCSTParser::Power_ExprContext::unary_Expr(size_t i) {
  return getRuleContext<PLCSTParser::Unary_ExprContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Power_ExprContext::StarStar() {
  return getTokens(PLCSTParser::StarStar);
}

tree::TerminalNode* PLCSTParser::Power_ExprContext::StarStar(size_t i) {
  return getToken(PLCSTParser::StarStar, i);
}


size_t PLCSTParser::Power_ExprContext::getRuleIndex() const {
  return PLCSTParser::RulePower_Expr;
}

void PLCSTParser::Power_ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterPower_Expr(this);
}

void PLCSTParser::Power_ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitPower_Expr(this);
}


std::any PLCSTParser::Power_ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitPower_Expr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Power_ExprContext* PLCSTParser::power_Expr() {
  Power_ExprContext *_localctx = _tracker.createInstance<Power_ExprContext>(_ctx, getState());
  enterRule(_localctx, 368, PLCSTParser::RulePower_Expr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2106);
    unary_Expr();
    setState(2111);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::StarStar) {
      setState(2107);
      match(PLCSTParser::StarStar);
      setState(2108);
      unary_Expr();
      setState(2113);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Unary_ExprContext ------------------------------------------------------------------

PLCSTParser::Unary_ExprContext::Unary_ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Unary_ExprContext::Minus() {
  return getToken(PLCSTParser::Minus, 0);
}

tree::TerminalNode* PLCSTParser::Unary_ExprContext::Plus() {
  return getToken(PLCSTParser::Plus, 0);
}

PLCSTParser::Primary_ExprContext* PLCSTParser::Unary_ExprContext::primary_Expr() {
  return getRuleContext<PLCSTParser::Primary_ExprContext>(0);
}

tree::TerminalNode* PLCSTParser::Unary_ExprContext::NOT() {
  return getToken(PLCSTParser::NOT, 0);
}


size_t PLCSTParser::Unary_ExprContext::getRuleIndex() const {
  return PLCSTParser::RuleUnary_Expr;
}

void PLCSTParser::Unary_ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterUnary_Expr(this);
}

void PLCSTParser::Unary_ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitUnary_Expr(this);
}


std::any PLCSTParser::Unary_ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitUnary_Expr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Unary_ExprContext* PLCSTParser::unary_Expr() {
  Unary_ExprContext *_localctx = _tracker.createInstance<Unary_ExprContext>(_ctx, getState());
  enterRule(_localctx, 370, PLCSTParser::RuleUnary_Expr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(2120);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::Minus: {
        enterOuterAlt(_localctx, 1);
        setState(2114);
        match(PLCSTParser::Minus);
        break;
      }

      case PLCSTParser::Plus: {
        enterOuterAlt(_localctx, 2);
        setState(2115);
        match(PLCSTParser::Plus);
        break;
      }

      case PLCSTParser::Unsigned_Int:
      case PLCSTParser::Signed_Int:
      case PLCSTParser::Binary_Int:
      case PLCSTParser::Octal_Int:
      case PLCSTParser::Hex_Int:
      case PLCSTParser::Science_real:
      case PLCSTParser::Const_bool:
      case PLCSTParser::S_Byte_Char_Str:
      case PLCSTParser::D_Byte_Char_Str:
      case PLCSTParser::Duration:
      case PLCSTParser::Time_Of_Day:
      case PLCSTParser::Date:
      case PLCSTParser::Date_And_Time:
      case PLCSTParser::Int_Type_Name:
      case PLCSTParser::Real_Type_Name:
      case PLCSTParser::Bool_Type_Name:
      case PLCSTParser::Multibits_Type_Name:
      case PLCSTParser::Direct_Variable:
      case PLCSTParser::Null:
      case PLCSTParser::REF:
      case PLCSTParser::THIS:
      case PLCSTParser::STRING:
      case PLCSTParser::WSTRING:
      case PLCSTParser::Std_Func_Name:
      case PLCSTParser::ACTION_QUALIFIER:
      case PLCSTParser::ACTION_TIME_QUALIFIER:
      case PLCSTParser::NOT:
      case PLCSTParser::Identifier:
      case PLCSTParser::LeftParen: {
        enterOuterAlt(_localctx, 3);
        setState(2117);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if (_la == PLCSTParser::NOT) {
          setState(2116);
          match(PLCSTParser::NOT);
        }
        setState(2119);
        primary_Expr();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Paren_Surrounded_ExprContext ------------------------------------------------------------------

PLCSTParser::Paren_Surrounded_ExprContext::Paren_Surrounded_ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Paren_Surrounded_ExprContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

PLCSTParser::ExpressionContext* PLCSTParser::Paren_Surrounded_ExprContext::expression() {
  return getRuleContext<PLCSTParser::ExpressionContext>(0);
}

tree::TerminalNode* PLCSTParser::Paren_Surrounded_ExprContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}


size_t PLCSTParser::Paren_Surrounded_ExprContext::getRuleIndex() const {
  return PLCSTParser::RuleParen_Surrounded_Expr;
}

void PLCSTParser::Paren_Surrounded_ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterParen_Surrounded_Expr(this);
}

void PLCSTParser::Paren_Surrounded_ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitParen_Surrounded_Expr(this);
}


std::any PLCSTParser::Paren_Surrounded_ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitParen_Surrounded_Expr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Paren_Surrounded_ExprContext* PLCSTParser::paren_Surrounded_Expr() {
  Paren_Surrounded_ExprContext *_localctx = _tracker.createInstance<Paren_Surrounded_ExprContext>(_ctx, getState());
  enterRule(_localctx, 372, PLCSTParser::RuleParen_Surrounded_Expr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2122);
    match(PLCSTParser::LeftParen);
    setState(2123);
    expression();
    setState(2124);
    match(PLCSTParser::RightParen);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Primary_ExprContext ------------------------------------------------------------------

PLCSTParser::Primary_ExprContext::Primary_ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::ConstantContext* PLCSTParser::Primary_ExprContext::constant() {
  return getRuleContext<PLCSTParser::ConstantContext>(0);
}

PLCSTParser::IdentifierContext* PLCSTParser::Primary_ExprContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}

PLCSTParser::Enum_ValueContext* PLCSTParser::Primary_ExprContext::enum_Value() {
  return getRuleContext<PLCSTParser::Enum_ValueContext>(0);
}

PLCSTParser::Variable_AccessContext* PLCSTParser::Primary_ExprContext::variable_Access() {
  return getRuleContext<PLCSTParser::Variable_AccessContext>(0);
}

PLCSTParser::Func_CallContext* PLCSTParser::Primary_ExprContext::func_Call() {
  return getRuleContext<PLCSTParser::Func_CallContext>(0);
}

PLCSTParser::Ref_ValueContext* PLCSTParser::Primary_ExprContext::ref_Value() {
  return getRuleContext<PLCSTParser::Ref_ValueContext>(0);
}

PLCSTParser::Paren_Surrounded_ExprContext* PLCSTParser::Primary_ExprContext::paren_Surrounded_Expr() {
  return getRuleContext<PLCSTParser::Paren_Surrounded_ExprContext>(0);
}


size_t PLCSTParser::Primary_ExprContext::getRuleIndex() const {
  return PLCSTParser::RulePrimary_Expr;
}

void PLCSTParser::Primary_ExprContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterPrimary_Expr(this);
}

void PLCSTParser::Primary_ExprContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitPrimary_Expr(this);
}


std::any PLCSTParser::Primary_ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitPrimary_Expr(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Primary_ExprContext* PLCSTParser::primary_Expr() {
  Primary_ExprContext *_localctx = _tracker.createInstance<Primary_ExprContext>(_ctx, getState());
  enterRule(_localctx, 374, PLCSTParser::RulePrimary_Expr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(2133);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 236, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(2126);
      constant();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(2127);
      identifier();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(2128);
      enum_Value();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(2129);
      variable_Access();
      break;
    }

    case 5: {
      enterOuterAlt(_localctx, 5);
      setState(2130);
      func_Call();
      break;
    }

    case 6: {
      enterOuterAlt(_localctx, 6);
      setState(2131);
      ref_Value();
      break;
    }

    case 7: {
      enterOuterAlt(_localctx, 7);
      setState(2132);
      paren_Surrounded_Expr();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Variable_AccessContext ------------------------------------------------------------------

PLCSTParser::Variable_AccessContext::Variable_AccessContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::VariableContext* PLCSTParser::Variable_AccessContext::variable() {
  return getRuleContext<PLCSTParser::VariableContext>(0);
}

tree::TerminalNode* PLCSTParser::Variable_AccessContext::Multibit_Part_Access() {
  return getToken(PLCSTParser::Multibit_Part_Access, 0);
}


size_t PLCSTParser::Variable_AccessContext::getRuleIndex() const {
  return PLCSTParser::RuleVariable_Access;
}

void PLCSTParser::Variable_AccessContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVariable_Access(this);
}

void PLCSTParser::Variable_AccessContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVariable_Access(this);
}


std::any PLCSTParser::Variable_AccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitVariable_Access(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Variable_AccessContext* PLCSTParser::variable_Access() {
  Variable_AccessContext *_localctx = _tracker.createInstance<Variable_AccessContext>(_ctx, getState());
  enterRule(_localctx, 376, PLCSTParser::RuleVariable_Access);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2135);
    variable();
    setState(2137);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::Multibit_Part_Access) {
      setState(2136);
      match(PLCSTParser::Multibit_Part_Access);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Callable_Obj_Params_AssignContext ------------------------------------------------------------------

PLCSTParser::Callable_Obj_Params_AssignContext::Callable_Obj_Params_AssignContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Callable_Obj_Params_AssignContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

tree::TerminalNode* PLCSTParser::Callable_Obj_Params_AssignContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

std::vector<PLCSTParser::Param_AssignContext *> PLCSTParser::Callable_Obj_Params_AssignContext::param_Assign() {
  return getRuleContexts<PLCSTParser::Param_AssignContext>();
}

PLCSTParser::Param_AssignContext* PLCSTParser::Callable_Obj_Params_AssignContext::param_Assign(size_t i) {
  return getRuleContext<PLCSTParser::Param_AssignContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Callable_Obj_Params_AssignContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Callable_Obj_Params_AssignContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Callable_Obj_Params_AssignContext::getRuleIndex() const {
  return PLCSTParser::RuleCallable_Obj_Params_Assign;
}

void PLCSTParser::Callable_Obj_Params_AssignContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCallable_Obj_Params_Assign(this);
}

void PLCSTParser::Callable_Obj_Params_AssignContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCallable_Obj_Params_Assign(this);
}


std::any PLCSTParser::Callable_Obj_Params_AssignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitCallable_Obj_Params_Assign(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Callable_Obj_Params_AssignContext* PLCSTParser::callable_Obj_Params_Assign() {
  Callable_Obj_Params_AssignContext *_localctx = _tracker.createInstance<Callable_Obj_Params_AssignContext>(_ctx, getState());
  enterRule(_localctx, 378, PLCSTParser::RuleCallable_Obj_Params_Assign);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2139);
    match(PLCSTParser::LeftParen);
    setState(2148);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 4082215571425278) != 0 || (((_la - 66) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 66)) & 72057595648540683) != 0 || (((_la - 145) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 145)) & 201327105) != 0) {
      setState(2140);
      param_Assign();
      setState(2145);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (_la == PLCSTParser::Comma) {
        setState(2141);
        match(PLCSTParser::Comma);
        setState(2142);
        param_Assign();
        setState(2147);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
    }
    setState(2150);
    match(PLCSTParser::RightParen);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Func_CallContext ------------------------------------------------------------------

PLCSTParser::Func_CallContext::Func_CallContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Func_AccessContext* PLCSTParser::Func_CallContext::func_Access() {
  return getRuleContext<PLCSTParser::Func_AccessContext>(0);
}

PLCSTParser::Callable_Obj_Params_AssignContext* PLCSTParser::Func_CallContext::callable_Obj_Params_Assign() {
  return getRuleContext<PLCSTParser::Callable_Obj_Params_AssignContext>(0);
}


size_t PLCSTParser::Func_CallContext::getRuleIndex() const {
  return PLCSTParser::RuleFunc_Call;
}

void PLCSTParser::Func_CallContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFunc_Call(this);
}

void PLCSTParser::Func_CallContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFunc_Call(this);
}


std::any PLCSTParser::Func_CallContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFunc_Call(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Func_CallContext* PLCSTParser::func_Call() {
  Func_CallContext *_localctx = _tracker.createInstance<Func_CallContext>(_ctx, getState());
  enterRule(_localctx, 380, PLCSTParser::RuleFunc_Call);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2152);
    func_Access();
    setState(2153);
    callable_Obj_Params_Assign();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Stmt_ListContext ------------------------------------------------------------------

PLCSTParser::Stmt_ListContext::Stmt_ListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<tree::TerminalNode *> PLCSTParser::Stmt_ListContext::Semi() {
  return getTokens(PLCSTParser::Semi);
}

tree::TerminalNode* PLCSTParser::Stmt_ListContext::Semi(size_t i) {
  return getToken(PLCSTParser::Semi, i);
}

std::vector<PLCSTParser::StmtContext *> PLCSTParser::Stmt_ListContext::stmt() {
  return getRuleContexts<PLCSTParser::StmtContext>();
}

PLCSTParser::StmtContext* PLCSTParser::Stmt_ListContext::stmt(size_t i) {
  return getRuleContext<PLCSTParser::StmtContext>(i);
}


size_t PLCSTParser::Stmt_ListContext::getRuleIndex() const {
  return PLCSTParser::RuleStmt_List;
}

void PLCSTParser::Stmt_ListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStmt_List(this);
}

void PLCSTParser::Stmt_ListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStmt_List(this);
}


std::any PLCSTParser::Stmt_ListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStmt_List(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Stmt_ListContext* PLCSTParser::stmt_List() {
  Stmt_ListContext *_localctx = _tracker.createInstance<Stmt_ListContext>(_ctx, getState());
  enterRule(_localctx, 382, PLCSTParser::RuleStmt_List);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(2161);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 241, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(2156);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if ((((_la - 47) & ~ 0x3fULL) == 0) &&
          ((1ULL << (_la - 47)) & 844424934326289) != 0 || (((_la - 124) & ~ 0x3fULL) == 0) &&
          ((1ULL << (_la - 124)) & 2428551) != 0) {
          setState(2155);
          stmt();
        }
        setState(2158);
        match(PLCSTParser::Semi); 
      }
      setState(2163);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 241, _ctx);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StmtContext ------------------------------------------------------------------

PLCSTParser::StmtContext::StmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Assign_StmtContext* PLCSTParser::StmtContext::assign_Stmt() {
  return getRuleContext<PLCSTParser::Assign_StmtContext>(0);
}

PLCSTParser::Subprog_Ctrl_StmtContext* PLCSTParser::StmtContext::subprog_Ctrl_Stmt() {
  return getRuleContext<PLCSTParser::Subprog_Ctrl_StmtContext>(0);
}

PLCSTParser::Selection_StmtContext* PLCSTParser::StmtContext::selection_Stmt() {
  return getRuleContext<PLCSTParser::Selection_StmtContext>(0);
}

PLCSTParser::Iteration_StmtContext* PLCSTParser::StmtContext::iteration_Stmt() {
  return getRuleContext<PLCSTParser::Iteration_StmtContext>(0);
}


size_t PLCSTParser::StmtContext::getRuleIndex() const {
  return PLCSTParser::RuleStmt;
}

void PLCSTParser::StmtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStmt(this);
}

void PLCSTParser::StmtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStmt(this);
}


std::any PLCSTParser::StmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStmt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::StmtContext* PLCSTParser::stmt() {
  StmtContext *_localctx = _tracker.createInstance<StmtContext>(_ctx, getState());
  enterRule(_localctx, 384, PLCSTParser::RuleStmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(2168);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 242, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(2164);
      assign_Stmt();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(2165);
      subprog_Ctrl_Stmt();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(2166);
      selection_Stmt();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(2167);
      iteration_Stmt();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Assign_StmtContext ------------------------------------------------------------------

PLCSTParser::Assign_StmtContext::Assign_StmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Var_AssignContext* PLCSTParser::Assign_StmtContext::var_Assign() {
  return getRuleContext<PLCSTParser::Var_AssignContext>(0);
}

PLCSTParser::Ref_AssignContext* PLCSTParser::Assign_StmtContext::ref_Assign() {
  return getRuleContext<PLCSTParser::Ref_AssignContext>(0);
}

PLCSTParser::Assignment_AttemptContext* PLCSTParser::Assign_StmtContext::assignment_Attempt() {
  return getRuleContext<PLCSTParser::Assignment_AttemptContext>(0);
}


size_t PLCSTParser::Assign_StmtContext::getRuleIndex() const {
  return PLCSTParser::RuleAssign_Stmt;
}

void PLCSTParser::Assign_StmtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAssign_Stmt(this);
}

void PLCSTParser::Assign_StmtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAssign_Stmt(this);
}


std::any PLCSTParser::Assign_StmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAssign_Stmt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Assign_StmtContext* PLCSTParser::assign_Stmt() {
  Assign_StmtContext *_localctx = _tracker.createInstance<Assign_StmtContext>(_ctx, getState());
  enterRule(_localctx, 386, PLCSTParser::RuleAssign_Stmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(2173);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 243, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(2170);
      var_Assign();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(2171);
      ref_Assign();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(2172);
      assignment_Attempt();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Var_AssignContext ------------------------------------------------------------------

PLCSTParser::Var_AssignContext::Var_AssignContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::VariableContext* PLCSTParser::Var_AssignContext::variable() {
  return getRuleContext<PLCSTParser::VariableContext>(0);
}

tree::TerminalNode* PLCSTParser::Var_AssignContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::ExpressionContext* PLCSTParser::Var_AssignContext::expression() {
  return getRuleContext<PLCSTParser::ExpressionContext>(0);
}


size_t PLCSTParser::Var_AssignContext::getRuleIndex() const {
  return PLCSTParser::RuleVar_Assign;
}

void PLCSTParser::Var_AssignContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVar_Assign(this);
}

void PLCSTParser::Var_AssignContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVar_Assign(this);
}


std::any PLCSTParser::Var_AssignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitVar_Assign(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Var_AssignContext* PLCSTParser::var_Assign() {
  Var_AssignContext *_localctx = _tracker.createInstance<Var_AssignContext>(_ctx, getState());
  enterRule(_localctx, 388, PLCSTParser::RuleVar_Assign);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2175);
    variable();
    setState(2176);
    match(PLCSTParser::Assign);
    setState(2177);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Assignment_AttemptContext ------------------------------------------------------------------

PLCSTParser::Assignment_AttemptContext::Assignment_AttemptContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Assignment_AttemptContext::QuestionEqual() {
  return getToken(PLCSTParser::QuestionEqual, 0);
}

std::vector<PLCSTParser::Ref_NameContext *> PLCSTParser::Assignment_AttemptContext::ref_Name() {
  return getRuleContexts<PLCSTParser::Ref_NameContext>();
}

PLCSTParser::Ref_NameContext* PLCSTParser::Assignment_AttemptContext::ref_Name(size_t i) {
  return getRuleContext<PLCSTParser::Ref_NameContext>(i);
}

std::vector<PLCSTParser::Ref_DerefContext *> PLCSTParser::Assignment_AttemptContext::ref_Deref() {
  return getRuleContexts<PLCSTParser::Ref_DerefContext>();
}

PLCSTParser::Ref_DerefContext* PLCSTParser::Assignment_AttemptContext::ref_Deref(size_t i) {
  return getRuleContext<PLCSTParser::Ref_DerefContext>(i);
}

PLCSTParser::Ref_ValueContext* PLCSTParser::Assignment_AttemptContext::ref_Value() {
  return getRuleContext<PLCSTParser::Ref_ValueContext>(0);
}


size_t PLCSTParser::Assignment_AttemptContext::getRuleIndex() const {
  return PLCSTParser::RuleAssignment_Attempt;
}

void PLCSTParser::Assignment_AttemptContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAssignment_Attempt(this);
}

void PLCSTParser::Assignment_AttemptContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAssignment_Attempt(this);
}


std::any PLCSTParser::Assignment_AttemptContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAssignment_Attempt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Assignment_AttemptContext* PLCSTParser::assignment_Attempt() {
  Assignment_AttemptContext *_localctx = _tracker.createInstance<Assignment_AttemptContext>(_ctx, getState());
  enterRule(_localctx, 390, PLCSTParser::RuleAssignment_Attempt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2181);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 244, _ctx)) {
    case 1: {
      setState(2179);
      ref_Name();
      break;
    }

    case 2: {
      setState(2180);
      ref_Deref();
      break;
    }

    default:
      break;
    }
    setState(2183);
    match(PLCSTParser::QuestionEqual);
    setState(2187);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 245, _ctx)) {
    case 1: {
      setState(2184);
      ref_Name();
      break;
    }

    case 2: {
      setState(2185);
      ref_Deref();
      break;
    }

    case 3: {
      setState(2186);
      ref_Value();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Inside_Callable_ObjContext ------------------------------------------------------------------

PLCSTParser::Inside_Callable_ObjContext::Inside_Callable_ObjContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Method_NameContext* PLCSTParser::Inside_Callable_ObjContext::method_Name() {
  return getRuleContext<PLCSTParser::Method_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Inside_Callable_ObjContext::THIS() {
  return getToken(PLCSTParser::THIS, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::Inside_Callable_ObjContext::Dot() {
  return getTokens(PLCSTParser::Dot);
}

tree::TerminalNode* PLCSTParser::Inside_Callable_ObjContext::Dot(size_t i) {
  return getToken(PLCSTParser::Dot, i);
}

std::vector<PLCSTParser::FB_Instance_NameContext *> PLCSTParser::Inside_Callable_ObjContext::fB_Instance_Name() {
  return getRuleContexts<PLCSTParser::FB_Instance_NameContext>();
}

PLCSTParser::FB_Instance_NameContext* PLCSTParser::Inside_Callable_ObjContext::fB_Instance_Name(size_t i) {
  return getRuleContext<PLCSTParser::FB_Instance_NameContext>(i);
}

std::vector<PLCSTParser::Class_Instance_NameContext *> PLCSTParser::Inside_Callable_ObjContext::class_Instance_Name() {
  return getRuleContexts<PLCSTParser::Class_Instance_NameContext>();
}

PLCSTParser::Class_Instance_NameContext* PLCSTParser::Inside_Callable_ObjContext::class_Instance_Name(size_t i) {
  return getRuleContext<PLCSTParser::Class_Instance_NameContext>(i);
}


size_t PLCSTParser::Inside_Callable_ObjContext::getRuleIndex() const {
  return PLCSTParser::RuleInside_Callable_Obj;
}

void PLCSTParser::Inside_Callable_ObjContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInside_Callable_Obj(this);
}

void PLCSTParser::Inside_Callable_ObjContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInside_Callable_Obj(this);
}


std::any PLCSTParser::Inside_Callable_ObjContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInside_Callable_Obj(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Inside_Callable_ObjContext* PLCSTParser::inside_Callable_Obj() {
  Inside_Callable_ObjContext *_localctx = _tracker.createInstance<Inside_Callable_ObjContext>(_ctx, getState());
  enterRule(_localctx, 392, PLCSTParser::RuleInside_Callable_Obj);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(2191);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::THIS) {
      setState(2189);
      match(PLCSTParser::THIS);
      setState(2190);
      match(PLCSTParser::Dot);
    }

    setState(2199); 
    _errHandler->sync(this);
    alt = 1;
    do {
      switch (alt) {
        case 1: {
              setState(2195);
              _errHandler->sync(this);
              switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 247, _ctx)) {
              case 1: {
                setState(2193);
                fB_Instance_Name();
                break;
              }

              case 2: {
                setState(2194);
                class_Instance_Name();
                break;
              }

              default:
                break;
              }
              setState(2197);
              match(PLCSTParser::Dot);
              break;
            }

      default:
        throw NoViableAltException(this);
      }
      setState(2201); 
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 248, _ctx);
    } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER);
    setState(2203);
    method_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Callable_ObjContext ------------------------------------------------------------------

PLCSTParser::Callable_ObjContext::Callable_ObjContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::FB_Instance_NameContext* PLCSTParser::Callable_ObjContext::fB_Instance_Name() {
  return getRuleContext<PLCSTParser::FB_Instance_NameContext>(0);
}

PLCSTParser::Method_NameContext* PLCSTParser::Callable_ObjContext::method_Name() {
  return getRuleContext<PLCSTParser::Method_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Callable_ObjContext::THIS() {
  return getToken(PLCSTParser::THIS, 0);
}

PLCSTParser::Inside_Callable_ObjContext* PLCSTParser::Callable_ObjContext::inside_Callable_Obj() {
  return getRuleContext<PLCSTParser::Inside_Callable_ObjContext>(0);
}


size_t PLCSTParser::Callable_ObjContext::getRuleIndex() const {
  return PLCSTParser::RuleCallable_Obj;
}

void PLCSTParser::Callable_ObjContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCallable_Obj(this);
}

void PLCSTParser::Callable_ObjContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCallable_Obj(this);
}


std::any PLCSTParser::Callable_ObjContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitCallable_Obj(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Callable_ObjContext* PLCSTParser::callable_Obj() {
  Callable_ObjContext *_localctx = _tracker.createInstance<Callable_ObjContext>(_ctx, getState());
  enterRule(_localctx, 394, PLCSTParser::RuleCallable_Obj);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(2209);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 249, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(2205);
      fB_Instance_Name();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(2206);
      method_Name();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(2207);
      match(PLCSTParser::THIS);
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(2208);
      inside_Callable_Obj();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- InvocationContext ------------------------------------------------------------------

PLCSTParser::InvocationContext::InvocationContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Callable_ObjContext* PLCSTParser::InvocationContext::callable_Obj() {
  return getRuleContext<PLCSTParser::Callable_ObjContext>(0);
}

PLCSTParser::Callable_Obj_Params_AssignContext* PLCSTParser::InvocationContext::callable_Obj_Params_Assign() {
  return getRuleContext<PLCSTParser::Callable_Obj_Params_AssignContext>(0);
}


size_t PLCSTParser::InvocationContext::getRuleIndex() const {
  return PLCSTParser::RuleInvocation;
}

void PLCSTParser::InvocationContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInvocation(this);
}

void PLCSTParser::InvocationContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInvocation(this);
}


std::any PLCSTParser::InvocationContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInvocation(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::InvocationContext* PLCSTParser::invocation() {
  InvocationContext *_localctx = _tracker.createInstance<InvocationContext>(_ctx, getState());
  enterRule(_localctx, 396, PLCSTParser::RuleInvocation);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2211);
    callable_Obj();
    setState(2212);
    callable_Obj_Params_Assign();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Subprog_Ctrl_StmtContext ------------------------------------------------------------------

PLCSTParser::Subprog_Ctrl_StmtContext::Subprog_Ctrl_StmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Func_CallContext* PLCSTParser::Subprog_Ctrl_StmtContext::func_Call() {
  return getRuleContext<PLCSTParser::Func_CallContext>(0);
}

PLCSTParser::InvocationContext* PLCSTParser::Subprog_Ctrl_StmtContext::invocation() {
  return getRuleContext<PLCSTParser::InvocationContext>(0);
}

tree::TerminalNode* PLCSTParser::Subprog_Ctrl_StmtContext::SUPER() {
  return getToken(PLCSTParser::SUPER, 0);
}

tree::TerminalNode* PLCSTParser::Subprog_Ctrl_StmtContext::LeftParen() {
  return getToken(PLCSTParser::LeftParen, 0);
}

tree::TerminalNode* PLCSTParser::Subprog_Ctrl_StmtContext::RightParen() {
  return getToken(PLCSTParser::RightParen, 0);
}

tree::TerminalNode* PLCSTParser::Subprog_Ctrl_StmtContext::RETURN() {
  return getToken(PLCSTParser::RETURN, 0);
}


size_t PLCSTParser::Subprog_Ctrl_StmtContext::getRuleIndex() const {
  return PLCSTParser::RuleSubprog_Ctrl_Stmt;
}

void PLCSTParser::Subprog_Ctrl_StmtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSubprog_Ctrl_Stmt(this);
}

void PLCSTParser::Subprog_Ctrl_StmtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSubprog_Ctrl_Stmt(this);
}


std::any PLCSTParser::Subprog_Ctrl_StmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSubprog_Ctrl_Stmt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Subprog_Ctrl_StmtContext* PLCSTParser::subprog_Ctrl_Stmt() {
  Subprog_Ctrl_StmtContext *_localctx = _tracker.createInstance<Subprog_Ctrl_StmtContext>(_ctx, getState());
  enterRule(_localctx, 398, PLCSTParser::RuleSubprog_Ctrl_Stmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(2220);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 250, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(2214);
      func_Call();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(2215);
      invocation();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(2216);
      match(PLCSTParser::SUPER);
      setState(2217);
      match(PLCSTParser::LeftParen);
      setState(2218);
      match(PLCSTParser::RightParen);
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(2219);
      match(PLCSTParser::RETURN);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Param_AssignContext ------------------------------------------------------------------

PLCSTParser::Param_AssignContext::Param_AssignContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Common_Param_AssignContext* PLCSTParser::Param_AssignContext::common_Param_Assign() {
  return getRuleContext<PLCSTParser::Common_Param_AssignContext>(0);
}

PLCSTParser::Ref_Param_AssignContext* PLCSTParser::Param_AssignContext::ref_Param_Assign() {
  return getRuleContext<PLCSTParser::Ref_Param_AssignContext>(0);
}

PLCSTParser::Other_Param_AssignContext* PLCSTParser::Param_AssignContext::other_Param_Assign() {
  return getRuleContext<PLCSTParser::Other_Param_AssignContext>(0);
}


size_t PLCSTParser::Param_AssignContext::getRuleIndex() const {
  return PLCSTParser::RuleParam_Assign;
}

void PLCSTParser::Param_AssignContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterParam_Assign(this);
}

void PLCSTParser::Param_AssignContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitParam_Assign(this);
}


std::any PLCSTParser::Param_AssignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitParam_Assign(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Param_AssignContext* PLCSTParser::param_Assign() {
  Param_AssignContext *_localctx = _tracker.createInstance<Param_AssignContext>(_ctx, getState());
  enterRule(_localctx, 400, PLCSTParser::RuleParam_Assign);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(2225);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 251, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(2222);
      common_Param_Assign();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(2223);
      ref_Param_Assign();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(2224);
      other_Param_Assign();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Common_Param_AssignContext ------------------------------------------------------------------

PLCSTParser::Common_Param_AssignContext::Common_Param_AssignContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::ExpressionContext* PLCSTParser::Common_Param_AssignContext::expression() {
  return getRuleContext<PLCSTParser::ExpressionContext>(0);
}

PLCSTParser::Variable_NameContext* PLCSTParser::Common_Param_AssignContext::variable_Name() {
  return getRuleContext<PLCSTParser::Variable_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Common_Param_AssignContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}


size_t PLCSTParser::Common_Param_AssignContext::getRuleIndex() const {
  return PLCSTParser::RuleCommon_Param_Assign;
}

void PLCSTParser::Common_Param_AssignContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCommon_Param_Assign(this);
}

void PLCSTParser::Common_Param_AssignContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCommon_Param_Assign(this);
}


std::any PLCSTParser::Common_Param_AssignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitCommon_Param_Assign(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Common_Param_AssignContext* PLCSTParser::common_Param_Assign() {
  Common_Param_AssignContext *_localctx = _tracker.createInstance<Common_Param_AssignContext>(_ctx, getState());
  enterRule(_localctx, 402, PLCSTParser::RuleCommon_Param_Assign);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2230);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 252, _ctx)) {
    case 1: {
      setState(2227);
      variable_Name();
      setState(2228);
      match(PLCSTParser::Assign);
      break;
    }

    default:
      break;
    }
    setState(2232);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_Param_AssignContext ------------------------------------------------------------------

PLCSTParser::Ref_Param_AssignContext::Ref_Param_AssignContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Ref_AssignContext* PLCSTParser::Ref_Param_AssignContext::ref_Assign() {
  return getRuleContext<PLCSTParser::Ref_AssignContext>(0);
}


size_t PLCSTParser::Ref_Param_AssignContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Param_Assign;
}

void PLCSTParser::Ref_Param_AssignContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Param_Assign(this);
}

void PLCSTParser::Ref_Param_AssignContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Param_Assign(this);
}


std::any PLCSTParser::Ref_Param_AssignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Param_Assign(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_Param_AssignContext* PLCSTParser::ref_Param_Assign() {
  Ref_Param_AssignContext *_localctx = _tracker.createInstance<Ref_Param_AssignContext>(_ctx, getState());
  enterRule(_localctx, 404, PLCSTParser::RuleRef_Param_Assign);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2234);
    ref_Assign();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Other_Param_AssignContext ------------------------------------------------------------------

PLCSTParser::Other_Param_AssignContext::Other_Param_AssignContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_NameContext* PLCSTParser::Other_Param_AssignContext::variable_Name() {
  return getRuleContext<PLCSTParser::Variable_NameContext>(0);
}

tree::TerminalNode* PLCSTParser::Other_Param_AssignContext::LeftAssign() {
  return getToken(PLCSTParser::LeftAssign, 0);
}

PLCSTParser::VariableContext* PLCSTParser::Other_Param_AssignContext::variable() {
  return getRuleContext<PLCSTParser::VariableContext>(0);
}

tree::TerminalNode* PLCSTParser::Other_Param_AssignContext::NOT() {
  return getToken(PLCSTParser::NOT, 0);
}


size_t PLCSTParser::Other_Param_AssignContext::getRuleIndex() const {
  return PLCSTParser::RuleOther_Param_Assign;
}

void PLCSTParser::Other_Param_AssignContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterOther_Param_Assign(this);
}

void PLCSTParser::Other_Param_AssignContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitOther_Param_Assign(this);
}


std::any PLCSTParser::Other_Param_AssignContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitOther_Param_Assign(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Other_Param_AssignContext* PLCSTParser::other_Param_Assign() {
  Other_Param_AssignContext *_localctx = _tracker.createInstance<Other_Param_AssignContext>(_ctx, getState());
  enterRule(_localctx, 406, PLCSTParser::RuleOther_Param_Assign);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2237);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::NOT) {
      setState(2236);
      match(PLCSTParser::NOT);
    }
    setState(2239);
    variable_Name();
    setState(2240);
    match(PLCSTParser::LeftAssign);
    setState(2241);
    variable();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Selection_StmtContext ------------------------------------------------------------------

PLCSTParser::Selection_StmtContext::Selection_StmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IF_StmtContext* PLCSTParser::Selection_StmtContext::iF_Stmt() {
  return getRuleContext<PLCSTParser::IF_StmtContext>(0);
}

PLCSTParser::Case_StmtContext* PLCSTParser::Selection_StmtContext::case_Stmt() {
  return getRuleContext<PLCSTParser::Case_StmtContext>(0);
}


size_t PLCSTParser::Selection_StmtContext::getRuleIndex() const {
  return PLCSTParser::RuleSelection_Stmt;
}

void PLCSTParser::Selection_StmtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSelection_Stmt(this);
}

void PLCSTParser::Selection_StmtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSelection_Stmt(this);
}


std::any PLCSTParser::Selection_StmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSelection_Stmt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Selection_StmtContext* PLCSTParser::selection_Stmt() {
  Selection_StmtContext *_localctx = _tracker.createInstance<Selection_StmtContext>(_ctx, getState());
  enterRule(_localctx, 408, PLCSTParser::RuleSelection_Stmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(2245);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::IF: {
        enterOuterAlt(_localctx, 1);
        setState(2243);
        iF_Stmt();
        break;
      }

      case PLCSTParser::CASE: {
        enterOuterAlt(_localctx, 2);
        setState(2244);
        case_Stmt();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IF_StmtContext ------------------------------------------------------------------

PLCSTParser::IF_StmtContext::IF_StmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::IF_StmtContext::IF() {
  return getToken(PLCSTParser::IF, 0);
}

std::vector<PLCSTParser::ExpressionContext *> PLCSTParser::IF_StmtContext::expression() {
  return getRuleContexts<PLCSTParser::ExpressionContext>();
}

PLCSTParser::ExpressionContext* PLCSTParser::IF_StmtContext::expression(size_t i) {
  return getRuleContext<PLCSTParser::ExpressionContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::IF_StmtContext::THEN() {
  return getTokens(PLCSTParser::THEN);
}

tree::TerminalNode* PLCSTParser::IF_StmtContext::THEN(size_t i) {
  return getToken(PLCSTParser::THEN, i);
}

std::vector<PLCSTParser::Stmt_ListContext *> PLCSTParser::IF_StmtContext::stmt_List() {
  return getRuleContexts<PLCSTParser::Stmt_ListContext>();
}

PLCSTParser::Stmt_ListContext* PLCSTParser::IF_StmtContext::stmt_List(size_t i) {
  return getRuleContext<PLCSTParser::Stmt_ListContext>(i);
}

tree::TerminalNode* PLCSTParser::IF_StmtContext::END_IF() {
  return getToken(PLCSTParser::END_IF, 0);
}

std::vector<tree::TerminalNode *> PLCSTParser::IF_StmtContext::ELSIF() {
  return getTokens(PLCSTParser::ELSIF);
}

tree::TerminalNode* PLCSTParser::IF_StmtContext::ELSIF(size_t i) {
  return getToken(PLCSTParser::ELSIF, i);
}

tree::TerminalNode* PLCSTParser::IF_StmtContext::ELSE() {
  return getToken(PLCSTParser::ELSE, 0);
}


size_t PLCSTParser::IF_StmtContext::getRuleIndex() const {
  return PLCSTParser::RuleIF_Stmt;
}

void PLCSTParser::IF_StmtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIF_Stmt(this);
}

void PLCSTParser::IF_StmtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIF_Stmt(this);
}


std::any PLCSTParser::IF_StmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitIF_Stmt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::IF_StmtContext* PLCSTParser::iF_Stmt() {
  IF_StmtContext *_localctx = _tracker.createInstance<IF_StmtContext>(_ctx, getState());
  enterRule(_localctx, 410, PLCSTParser::RuleIF_Stmt);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2247);
    match(PLCSTParser::IF);
    setState(2248);
    expression();
    setState(2249);
    match(PLCSTParser::THEN);
    setState(2250);
    stmt_List();
    setState(2258);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::ELSIF) {
      setState(2251);
      match(PLCSTParser::ELSIF);
      setState(2252);
      expression();
      setState(2253);
      match(PLCSTParser::THEN);
      setState(2254);
      stmt_List();
      setState(2260);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(2263);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::ELSE) {
      setState(2261);
      match(PLCSTParser::ELSE);
      setState(2262);
      stmt_List();
    }
    setState(2265);
    match(PLCSTParser::END_IF);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Case_StmtContext ------------------------------------------------------------------

PLCSTParser::Case_StmtContext::Case_StmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Case_StmtContext::CASE() {
  return getToken(PLCSTParser::CASE, 0);
}

PLCSTParser::ExpressionContext* PLCSTParser::Case_StmtContext::expression() {
  return getRuleContext<PLCSTParser::ExpressionContext>(0);
}

tree::TerminalNode* PLCSTParser::Case_StmtContext::OF() {
  return getToken(PLCSTParser::OF, 0);
}

tree::TerminalNode* PLCSTParser::Case_StmtContext::END_CASE() {
  return getToken(PLCSTParser::END_CASE, 0);
}

std::vector<PLCSTParser::Case_SelectionContext *> PLCSTParser::Case_StmtContext::case_Selection() {
  return getRuleContexts<PLCSTParser::Case_SelectionContext>();
}

PLCSTParser::Case_SelectionContext* PLCSTParser::Case_StmtContext::case_Selection(size_t i) {
  return getRuleContext<PLCSTParser::Case_SelectionContext>(i);
}

tree::TerminalNode* PLCSTParser::Case_StmtContext::ELSE() {
  return getToken(PLCSTParser::ELSE, 0);
}

PLCSTParser::Stmt_ListContext* PLCSTParser::Case_StmtContext::stmt_List() {
  return getRuleContext<PLCSTParser::Stmt_ListContext>(0);
}


size_t PLCSTParser::Case_StmtContext::getRuleIndex() const {
  return PLCSTParser::RuleCase_Stmt;
}

void PLCSTParser::Case_StmtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCase_Stmt(this);
}

void PLCSTParser::Case_StmtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCase_Stmt(this);
}


std::any PLCSTParser::Case_StmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitCase_Stmt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Case_StmtContext* PLCSTParser::case_Stmt() {
  Case_StmtContext *_localctx = _tracker.createInstance<Case_StmtContext>(_ctx, getState());
  enterRule(_localctx, 412, PLCSTParser::RuleCase_Stmt);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2267);
    match(PLCSTParser::CASE);
    setState(2268);
    expression();
    setState(2269);
    match(PLCSTParser::OF);
    setState(2271); 
    _errHandler->sync(this);
    _la = _input->LA(1);
    do {
      setState(2270);
      case_Selection();
      setState(2273); 
      _errHandler->sync(this);
      _la = _input->LA(1);
    } while (((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 4082215571425278) != 0 || (((_la - 66) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 66)) & 72057595648540683) != 0 || (((_la - 145) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 145)) & 201327105) != 0);
    setState(2277);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::ELSE) {
      setState(2275);
      match(PLCSTParser::ELSE);
      setState(2276);
      stmt_List();
    }
    setState(2279);
    match(PLCSTParser::END_CASE);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Case_SelectionContext ------------------------------------------------------------------

PLCSTParser::Case_SelectionContext::Case_SelectionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Case_ListContext* PLCSTParser::Case_SelectionContext::case_List() {
  return getRuleContext<PLCSTParser::Case_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Case_SelectionContext::Colon() {
  return getToken(PLCSTParser::Colon, 0);
}

PLCSTParser::Stmt_ListContext* PLCSTParser::Case_SelectionContext::stmt_List() {
  return getRuleContext<PLCSTParser::Stmt_ListContext>(0);
}


size_t PLCSTParser::Case_SelectionContext::getRuleIndex() const {
  return PLCSTParser::RuleCase_Selection;
}

void PLCSTParser::Case_SelectionContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCase_Selection(this);
}

void PLCSTParser::Case_SelectionContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCase_Selection(this);
}


std::any PLCSTParser::Case_SelectionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitCase_Selection(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Case_SelectionContext* PLCSTParser::case_Selection() {
  Case_SelectionContext *_localctx = _tracker.createInstance<Case_SelectionContext>(_ctx, getState());
  enterRule(_localctx, 414, PLCSTParser::RuleCase_Selection);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2281);
    case_List();
    setState(2282);
    match(PLCSTParser::Colon);
    setState(2283);
    stmt_List();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Case_ListContext ------------------------------------------------------------------

PLCSTParser::Case_ListContext::Case_ListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::Case_List_ElemContext *> PLCSTParser::Case_ListContext::case_List_Elem() {
  return getRuleContexts<PLCSTParser::Case_List_ElemContext>();
}

PLCSTParser::Case_List_ElemContext* PLCSTParser::Case_ListContext::case_List_Elem(size_t i) {
  return getRuleContext<PLCSTParser::Case_List_ElemContext>(i);
}

std::vector<tree::TerminalNode *> PLCSTParser::Case_ListContext::Comma() {
  return getTokens(PLCSTParser::Comma);
}

tree::TerminalNode* PLCSTParser::Case_ListContext::Comma(size_t i) {
  return getToken(PLCSTParser::Comma, i);
}


size_t PLCSTParser::Case_ListContext::getRuleIndex() const {
  return PLCSTParser::RuleCase_List;
}

void PLCSTParser::Case_ListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCase_List(this);
}

void PLCSTParser::Case_ListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCase_List(this);
}


std::any PLCSTParser::Case_ListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitCase_List(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Case_ListContext* PLCSTParser::case_List() {
  Case_ListContext *_localctx = _tracker.createInstance<Case_ListContext>(_ctx, getState());
  enterRule(_localctx, 416, PLCSTParser::RuleCase_List);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2285);
    case_List_Elem();
    setState(2290);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == PLCSTParser::Comma) {
      setState(2286);
      match(PLCSTParser::Comma);
      setState(2287);
      case_List_Elem();
      setState(2292);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Case_List_ElemContext ------------------------------------------------------------------

PLCSTParser::Case_List_ElemContext::Case_List_ElemContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::SubrangeContext* PLCSTParser::Case_List_ElemContext::subrange() {
  return getRuleContext<PLCSTParser::SubrangeContext>(0);
}

PLCSTParser::Constant_ExprContext* PLCSTParser::Case_List_ElemContext::constant_Expr() {
  return getRuleContext<PLCSTParser::Constant_ExprContext>(0);
}


size_t PLCSTParser::Case_List_ElemContext::getRuleIndex() const {
  return PLCSTParser::RuleCase_List_Elem;
}

void PLCSTParser::Case_List_ElemContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterCase_List_Elem(this);
}

void PLCSTParser::Case_List_ElemContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitCase_List_Elem(this);
}


std::any PLCSTParser::Case_List_ElemContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitCase_List_Elem(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Case_List_ElemContext* PLCSTParser::case_List_Elem() {
  Case_List_ElemContext *_localctx = _tracker.createInstance<Case_List_ElemContext>(_ctx, getState());
  enterRule(_localctx, 418, PLCSTParser::RuleCase_List_Elem);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(2295);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 260, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(2293);
      subrange();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(2294);
      constant_Expr();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Iteration_StmtContext ------------------------------------------------------------------

PLCSTParser::Iteration_StmtContext::Iteration_StmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::For_StmtContext* PLCSTParser::Iteration_StmtContext::for_Stmt() {
  return getRuleContext<PLCSTParser::For_StmtContext>(0);
}

PLCSTParser::While_StmtContext* PLCSTParser::Iteration_StmtContext::while_Stmt() {
  return getRuleContext<PLCSTParser::While_StmtContext>(0);
}

PLCSTParser::Repeat_StmtContext* PLCSTParser::Iteration_StmtContext::repeat_Stmt() {
  return getRuleContext<PLCSTParser::Repeat_StmtContext>(0);
}

tree::TerminalNode* PLCSTParser::Iteration_StmtContext::EXIT() {
  return getToken(PLCSTParser::EXIT, 0);
}

tree::TerminalNode* PLCSTParser::Iteration_StmtContext::CONTINUE() {
  return getToken(PLCSTParser::CONTINUE, 0);
}


size_t PLCSTParser::Iteration_StmtContext::getRuleIndex() const {
  return PLCSTParser::RuleIteration_Stmt;
}

void PLCSTParser::Iteration_StmtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIteration_Stmt(this);
}

void PLCSTParser::Iteration_StmtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIteration_Stmt(this);
}


std::any PLCSTParser::Iteration_StmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitIteration_Stmt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Iteration_StmtContext* PLCSTParser::iteration_Stmt() {
  Iteration_StmtContext *_localctx = _tracker.createInstance<Iteration_StmtContext>(_ctx, getState());
  enterRule(_localctx, 420, PLCSTParser::RuleIteration_Stmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(2302);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case PLCSTParser::FOR: {
        enterOuterAlt(_localctx, 1);
        setState(2297);
        for_Stmt();
        break;
      }

      case PLCSTParser::WHILE: {
        enterOuterAlt(_localctx, 2);
        setState(2298);
        while_Stmt();
        break;
      }

      case PLCSTParser::REPEAT: {
        enterOuterAlt(_localctx, 3);
        setState(2299);
        repeat_Stmt();
        break;
      }

      case PLCSTParser::EXIT: {
        enterOuterAlt(_localctx, 4);
        setState(2300);
        match(PLCSTParser::EXIT);
        break;
      }

      case PLCSTParser::CONTINUE: {
        enterOuterAlt(_localctx, 5);
        setState(2301);
        match(PLCSTParser::CONTINUE);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- For_StmtContext ------------------------------------------------------------------

PLCSTParser::For_StmtContext::For_StmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::For_StmtContext::FOR() {
  return getToken(PLCSTParser::FOR, 0);
}

PLCSTParser::Control_VariableContext* PLCSTParser::For_StmtContext::control_Variable() {
  return getRuleContext<PLCSTParser::Control_VariableContext>(0);
}

tree::TerminalNode* PLCSTParser::For_StmtContext::Assign() {
  return getToken(PLCSTParser::Assign, 0);
}

PLCSTParser::For_ListContext* PLCSTParser::For_StmtContext::for_List() {
  return getRuleContext<PLCSTParser::For_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::For_StmtContext::DO() {
  return getToken(PLCSTParser::DO, 0);
}

PLCSTParser::Stmt_ListContext* PLCSTParser::For_StmtContext::stmt_List() {
  return getRuleContext<PLCSTParser::Stmt_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::For_StmtContext::END_FOR() {
  return getToken(PLCSTParser::END_FOR, 0);
}


size_t PLCSTParser::For_StmtContext::getRuleIndex() const {
  return PLCSTParser::RuleFor_Stmt;
}

void PLCSTParser::For_StmtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFor_Stmt(this);
}

void PLCSTParser::For_StmtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFor_Stmt(this);
}


std::any PLCSTParser::For_StmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFor_Stmt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::For_StmtContext* PLCSTParser::for_Stmt() {
  For_StmtContext *_localctx = _tracker.createInstance<For_StmtContext>(_ctx, getState());
  enterRule(_localctx, 422, PLCSTParser::RuleFor_Stmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2304);
    match(PLCSTParser::FOR);
    setState(2305);
    control_Variable();
    setState(2306);
    match(PLCSTParser::Assign);
    setState(2307);
    for_List();
    setState(2308);
    match(PLCSTParser::DO);
    setState(2309);
    stmt_List();
    setState(2310);
    match(PLCSTParser::END_FOR);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- For_ListContext ------------------------------------------------------------------

PLCSTParser::For_ListContext::For_ListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<PLCSTParser::ExpressionContext *> PLCSTParser::For_ListContext::expression() {
  return getRuleContexts<PLCSTParser::ExpressionContext>();
}

PLCSTParser::ExpressionContext* PLCSTParser::For_ListContext::expression(size_t i) {
  return getRuleContext<PLCSTParser::ExpressionContext>(i);
}

tree::TerminalNode* PLCSTParser::For_ListContext::TO() {
  return getToken(PLCSTParser::TO, 0);
}

tree::TerminalNode* PLCSTParser::For_ListContext::BY() {
  return getToken(PLCSTParser::BY, 0);
}


size_t PLCSTParser::For_ListContext::getRuleIndex() const {
  return PLCSTParser::RuleFor_List;
}

void PLCSTParser::For_ListContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFor_List(this);
}

void PLCSTParser::For_ListContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFor_List(this);
}


std::any PLCSTParser::For_ListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFor_List(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::For_ListContext* PLCSTParser::for_List() {
  For_ListContext *_localctx = _tracker.createInstance<For_ListContext>(_ctx, getState());
  enterRule(_localctx, 424, PLCSTParser::RuleFor_List);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2312);
    expression();
    setState(2313);
    match(PLCSTParser::TO);
    setState(2314);
    expression();
    setState(2317);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == PLCSTParser::BY) {
      setState(2315);
      match(PLCSTParser::BY);
      setState(2316);
      expression();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- While_StmtContext ------------------------------------------------------------------

PLCSTParser::While_StmtContext::While_StmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::While_StmtContext::WHILE() {
  return getToken(PLCSTParser::WHILE, 0);
}

PLCSTParser::ExpressionContext* PLCSTParser::While_StmtContext::expression() {
  return getRuleContext<PLCSTParser::ExpressionContext>(0);
}

tree::TerminalNode* PLCSTParser::While_StmtContext::DO() {
  return getToken(PLCSTParser::DO, 0);
}

PLCSTParser::Stmt_ListContext* PLCSTParser::While_StmtContext::stmt_List() {
  return getRuleContext<PLCSTParser::Stmt_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::While_StmtContext::END_WHILE() {
  return getToken(PLCSTParser::END_WHILE, 0);
}


size_t PLCSTParser::While_StmtContext::getRuleIndex() const {
  return PLCSTParser::RuleWhile_Stmt;
}

void PLCSTParser::While_StmtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterWhile_Stmt(this);
}

void PLCSTParser::While_StmtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitWhile_Stmt(this);
}


std::any PLCSTParser::While_StmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitWhile_Stmt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::While_StmtContext* PLCSTParser::while_Stmt() {
  While_StmtContext *_localctx = _tracker.createInstance<While_StmtContext>(_ctx, getState());
  enterRule(_localctx, 426, PLCSTParser::RuleWhile_Stmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2319);
    match(PLCSTParser::WHILE);
    setState(2320);
    expression();
    setState(2321);
    match(PLCSTParser::DO);
    setState(2322);
    stmt_List();
    setState(2323);
    match(PLCSTParser::END_WHILE);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Repeat_StmtContext ------------------------------------------------------------------

PLCSTParser::Repeat_StmtContext::Repeat_StmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::Repeat_StmtContext::REPEAT() {
  return getToken(PLCSTParser::REPEAT, 0);
}

PLCSTParser::Stmt_ListContext* PLCSTParser::Repeat_StmtContext::stmt_List() {
  return getRuleContext<PLCSTParser::Stmt_ListContext>(0);
}

tree::TerminalNode* PLCSTParser::Repeat_StmtContext::UNTIL() {
  return getToken(PLCSTParser::UNTIL, 0);
}

PLCSTParser::ExpressionContext* PLCSTParser::Repeat_StmtContext::expression() {
  return getRuleContext<PLCSTParser::ExpressionContext>(0);
}

tree::TerminalNode* PLCSTParser::Repeat_StmtContext::END_REPEAT() {
  return getToken(PLCSTParser::END_REPEAT, 0);
}


size_t PLCSTParser::Repeat_StmtContext::getRuleIndex() const {
  return PLCSTParser::RuleRepeat_Stmt;
}

void PLCSTParser::Repeat_StmtContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRepeat_Stmt(this);
}

void PLCSTParser::Repeat_StmtContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRepeat_Stmt(this);
}


std::any PLCSTParser::Repeat_StmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRepeat_Stmt(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Repeat_StmtContext* PLCSTParser::repeat_Stmt() {
  Repeat_StmtContext *_localctx = _tracker.createInstance<Repeat_StmtContext>(_ctx, getState());
  enterRule(_localctx, 428, PLCSTParser::RuleRepeat_Stmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2325);
    match(PLCSTParser::REPEAT);
    setState(2326);
    stmt_List();
    setState(2327);
    match(PLCSTParser::UNTIL);
    setState(2328);
    expression();
    setState(2329);
    match(PLCSTParser::END_REPEAT);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Simple_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Simple_Type_NameContext::Simple_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Simple_Type_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Simple_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleSimple_Type_Name;
}

void PLCSTParser::Simple_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSimple_Type_Name(this);
}

void PLCSTParser::Simple_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSimple_Type_Name(this);
}


std::any PLCSTParser::Simple_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSimple_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Simple_Type_NameContext* PLCSTParser::simple_Type_Name() {
  Simple_Type_NameContext *_localctx = _tracker.createInstance<Simple_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 430, PLCSTParser::RuleSimple_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2331);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Subrange_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Subrange_Type_NameContext::Subrange_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Subrange_Type_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Subrange_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleSubrange_Type_Name;
}

void PLCSTParser::Subrange_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterSubrange_Type_Name(this);
}

void PLCSTParser::Subrange_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitSubrange_Type_Name(this);
}


std::any PLCSTParser::Subrange_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitSubrange_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Subrange_Type_NameContext* PLCSTParser::subrange_Type_Name() {
  Subrange_Type_NameContext *_localctx = _tracker.createInstance<Subrange_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 432, PLCSTParser::RuleSubrange_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2333);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Enum_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Enum_Type_NameContext::Enum_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Enum_Type_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Enum_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleEnum_Type_Name;
}

void PLCSTParser::Enum_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterEnum_Type_Name(this);
}

void PLCSTParser::Enum_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitEnum_Type_Name(this);
}


std::any PLCSTParser::Enum_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitEnum_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Enum_Type_NameContext* PLCSTParser::enum_Type_Name() {
  Enum_Type_NameContext *_localctx = _tracker.createInstance<Enum_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 434, PLCSTParser::RuleEnum_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2335);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Array_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Array_Type_NameContext::Array_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Array_Type_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Array_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleArray_Type_Name;
}

void PLCSTParser::Array_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterArray_Type_Name(this);
}

void PLCSTParser::Array_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitArray_Type_Name(this);
}


std::any PLCSTParser::Array_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitArray_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Array_Type_NameContext* PLCSTParser::array_Type_Name() {
  Array_Type_NameContext *_localctx = _tracker.createInstance<Array_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 436, PLCSTParser::RuleArray_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2337);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Struct_Type_NameContext::Struct_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Struct_Type_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Struct_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Type_Name;
}

void PLCSTParser::Struct_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Type_Name(this);
}

void PLCSTParser::Struct_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Type_Name(this);
}


std::any PLCSTParser::Struct_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_Type_NameContext* PLCSTParser::struct_Type_Name() {
  Struct_Type_NameContext *_localctx = _tracker.createInstance<Struct_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 438, PLCSTParser::RuleStruct_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2339);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Struct_Elem_NameContext ------------------------------------------------------------------

PLCSTParser::Struct_Elem_NameContext::Struct_Elem_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Struct_Elem_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Struct_Elem_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleStruct_Elem_Name;
}

void PLCSTParser::Struct_Elem_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStruct_Elem_Name(this);
}

void PLCSTParser::Struct_Elem_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStruct_Elem_Name(this);
}


std::any PLCSTParser::Struct_Elem_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStruct_Elem_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Struct_Elem_NameContext* PLCSTParser::struct_Elem_Name() {
  Struct_Elem_NameContext *_localctx = _tracker.createInstance<Struct_Elem_NameContext>(_ctx, getState());
  enterRule(_localctx, 440, PLCSTParser::RuleStruct_Elem_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2341);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_NameContext ------------------------------------------------------------------

PLCSTParser::Ref_NameContext::Ref_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Ref_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Ref_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Name;
}

void PLCSTParser::Ref_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Name(this);
}

void PLCSTParser::Ref_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Name(this);
}


std::any PLCSTParser::Ref_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_NameContext* PLCSTParser::ref_Name() {
  Ref_NameContext *_localctx = _tracker.createInstance<Ref_NameContext>(_ctx, getState());
  enterRule(_localctx, 442, PLCSTParser::RuleRef_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2343);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Ref_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Ref_Type_NameContext::Ref_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Ref_Type_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Ref_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleRef_Type_Name;
}

void PLCSTParser::Ref_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterRef_Type_Name(this);
}

void PLCSTParser::Ref_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitRef_Type_Name(this);
}


std::any PLCSTParser::Ref_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitRef_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Ref_Type_NameContext* PLCSTParser::ref_Type_Name() {
  Ref_Type_NameContext *_localctx = _tracker.createInstance<Ref_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 444, PLCSTParser::RuleRef_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2345);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Variable_NameContext ------------------------------------------------------------------

PLCSTParser::Variable_NameContext::Variable_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Variable_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Variable_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleVariable_Name;
}

void PLCSTParser::Variable_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterVariable_Name(this);
}

void PLCSTParser::Variable_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitVariable_Name(this);
}


std::any PLCSTParser::Variable_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitVariable_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Variable_NameContext* PLCSTParser::variable_Name() {
  Variable_NameContext *_localctx = _tracker.createInstance<Variable_NameContext>(_ctx, getState());
  enterRule(_localctx, 446, PLCSTParser::RuleVariable_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2347);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FB_NameContext ------------------------------------------------------------------

PLCSTParser::FB_NameContext::FB_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::FB_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::FB_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleFB_Name;
}

void PLCSTParser::FB_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterFB_Name(this);
}

void PLCSTParser::FB_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitFB_Name(this);
}


std::any PLCSTParser::FB_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitFB_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::FB_NameContext* PLCSTParser::fB_Name() {
  FB_NameContext *_localctx = _tracker.createInstance<FB_NameContext>(_ctx, getState());
  enterRule(_localctx, 448, PLCSTParser::RuleFB_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2349);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Global_Var_NameContext ------------------------------------------------------------------

PLCSTParser::Global_Var_NameContext::Global_Var_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Global_Var_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Global_Var_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleGlobal_Var_Name;
}

void PLCSTParser::Global_Var_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterGlobal_Var_Name(this);
}

void PLCSTParser::Global_Var_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitGlobal_Var_Name(this);
}


std::any PLCSTParser::Global_Var_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitGlobal_Var_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Global_Var_NameContext* PLCSTParser::global_Var_Name() {
  Global_Var_NameContext *_localctx = _tracker.createInstance<Global_Var_NameContext>(_ctx, getState());
  enterRule(_localctx, 450, PLCSTParser::RuleGlobal_Var_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2351);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Derived_Func_NameContext ------------------------------------------------------------------

PLCSTParser::Derived_Func_NameContext::Derived_Func_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Derived_Func_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Derived_Func_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleDerived_Func_Name;
}

void PLCSTParser::Derived_Func_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDerived_Func_Name(this);
}

void PLCSTParser::Derived_Func_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDerived_Func_Name(this);
}


std::any PLCSTParser::Derived_Func_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitDerived_Func_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Derived_Func_NameContext* PLCSTParser::derived_Func_Name() {
  Derived_Func_NameContext *_localctx = _tracker.createInstance<Derived_Func_NameContext>(_ctx, getState());
  enterRule(_localctx, 452, PLCSTParser::RuleDerived_Func_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2353);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Derived_FB_NameContext ------------------------------------------------------------------

PLCSTParser::Derived_FB_NameContext::Derived_FB_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Derived_FB_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Derived_FB_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleDerived_FB_Name;
}

void PLCSTParser::Derived_FB_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterDerived_FB_Name(this);
}

void PLCSTParser::Derived_FB_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitDerived_FB_Name(this);
}


std::any PLCSTParser::Derived_FB_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitDerived_FB_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Derived_FB_NameContext* PLCSTParser::derived_FB_Name() {
  Derived_FB_NameContext *_localctx = _tracker.createInstance<Derived_FB_NameContext>(_ctx, getState());
  enterRule(_localctx, 454, PLCSTParser::RuleDerived_FB_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2355);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Method_NameContext ------------------------------------------------------------------

PLCSTParser::Method_NameContext::Method_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Method_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Method_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleMethod_Name;
}

void PLCSTParser::Method_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterMethod_Name(this);
}

void PLCSTParser::Method_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitMethod_Name(this);
}


std::any PLCSTParser::Method_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitMethod_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Method_NameContext* PLCSTParser::method_Name() {
  Method_NameContext *_localctx = _tracker.createInstance<Method_NameContext>(_ctx, getState());
  enterRule(_localctx, 456, PLCSTParser::RuleMethod_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2357);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Class_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Class_Type_NameContext::Class_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Class_Type_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Class_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleClass_Type_Name;
}

void PLCSTParser::Class_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterClass_Type_Name(this);
}

void PLCSTParser::Class_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitClass_Type_Name(this);
}


std::any PLCSTParser::Class_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitClass_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Class_Type_NameContext* PLCSTParser::class_Type_Name() {
  Class_Type_NameContext *_localctx = _tracker.createInstance<Class_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 458, PLCSTParser::RuleClass_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2359);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Class_NameContext ------------------------------------------------------------------

PLCSTParser::Class_NameContext::Class_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Class_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Class_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleClass_Name;
}

void PLCSTParser::Class_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterClass_Name(this);
}

void PLCSTParser::Class_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitClass_Name(this);
}


std::any PLCSTParser::Class_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitClass_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Class_NameContext* PLCSTParser::class_Name() {
  Class_NameContext *_localctx = _tracker.createInstance<Class_NameContext>(_ctx, getState());
  enterRule(_localctx, 460, PLCSTParser::RuleClass_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2361);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Interface_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Interface_Type_NameContext::Interface_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Interface_Type_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Interface_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleInterface_Type_Name;
}

void PLCSTParser::Interface_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterInterface_Type_Name(this);
}

void PLCSTParser::Interface_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitInterface_Type_Name(this);
}


std::any PLCSTParser::Interface_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitInterface_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Interface_Type_NameContext* PLCSTParser::interface_Type_Name() {
  Interface_Type_NameContext *_localctx = _tracker.createInstance<Interface_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 462, PLCSTParser::RuleInterface_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2363);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Prog_Type_NameContext::Prog_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Prog_Type_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Prog_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Type_Name;
}

void PLCSTParser::Prog_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Type_Name(this);
}

void PLCSTParser::Prog_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Type_Name(this);
}


std::any PLCSTParser::Prog_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_Type_NameContext* PLCSTParser::prog_Type_Name() {
  Prog_Type_NameContext *_localctx = _tracker.createInstance<Prog_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 464, PLCSTParser::RuleProg_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2365);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Step_NameContext ------------------------------------------------------------------

PLCSTParser::Step_NameContext::Step_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Step_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Step_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleStep_Name;
}

void PLCSTParser::Step_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterStep_Name(this);
}

void PLCSTParser::Step_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitStep_Name(this);
}


std::any PLCSTParser::Step_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitStep_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Step_NameContext* PLCSTParser::step_Name() {
  Step_NameContext *_localctx = _tracker.createInstance<Step_NameContext>(_ctx, getState());
  enterRule(_localctx, 466, PLCSTParser::RuleStep_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2367);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Action_NameContext ------------------------------------------------------------------

PLCSTParser::Action_NameContext::Action_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Action_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Action_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleAction_Name;
}

void PLCSTParser::Action_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAction_Name(this);
}

void PLCSTParser::Action_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAction_Name(this);
}


std::any PLCSTParser::Action_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAction_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Action_NameContext* PLCSTParser::action_Name() {
  Action_NameContext *_localctx = _tracker.createInstance<Action_NameContext>(_ctx, getState());
  enterRule(_localctx, 468, PLCSTParser::RuleAction_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2369);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Transition_NameContext ------------------------------------------------------------------

PLCSTParser::Transition_NameContext::Transition_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Transition_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Transition_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleTransition_Name;
}

void PLCSTParser::Transition_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTransition_Name(this);
}

void PLCSTParser::Transition_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTransition_Name(this);
}


std::any PLCSTParser::Transition_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitTransition_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Transition_NameContext* PLCSTParser::transition_Name() {
  Transition_NameContext *_localctx = _tracker.createInstance<Transition_NameContext>(_ctx, getState());
  enterRule(_localctx, 470, PLCSTParser::RuleTransition_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2371);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Config_NameContext ------------------------------------------------------------------

PLCSTParser::Config_NameContext::Config_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Config_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Config_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleConfig_Name;
}

void PLCSTParser::Config_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterConfig_Name(this);
}

void PLCSTParser::Config_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitConfig_Name(this);
}


std::any PLCSTParser::Config_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitConfig_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Config_NameContext* PLCSTParser::config_Name() {
  Config_NameContext *_localctx = _tracker.createInstance<Config_NameContext>(_ctx, getState());
  enterRule(_localctx, 472, PLCSTParser::RuleConfig_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2373);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Resource_Type_NameContext ------------------------------------------------------------------

PLCSTParser::Resource_Type_NameContext::Resource_Type_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Resource_Type_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Resource_Type_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleResource_Type_Name;
}

void PLCSTParser::Resource_Type_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterResource_Type_Name(this);
}

void PLCSTParser::Resource_Type_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitResource_Type_Name(this);
}


std::any PLCSTParser::Resource_Type_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitResource_Type_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Resource_Type_NameContext* PLCSTParser::resource_Type_Name() {
  Resource_Type_NameContext *_localctx = _tracker.createInstance<Resource_Type_NameContext>(_ctx, getState());
  enterRule(_localctx, 474, PLCSTParser::RuleResource_Type_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2375);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Resource_NameContext ------------------------------------------------------------------

PLCSTParser::Resource_NameContext::Resource_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Resource_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Resource_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleResource_Name;
}

void PLCSTParser::Resource_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterResource_Name(this);
}

void PLCSTParser::Resource_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitResource_Name(this);
}


std::any PLCSTParser::Resource_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitResource_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Resource_NameContext* PLCSTParser::resource_Name() {
  Resource_NameContext *_localctx = _tracker.createInstance<Resource_NameContext>(_ctx, getState());
  enterRule(_localctx, 476, PLCSTParser::RuleResource_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2377);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Access_NameContext ------------------------------------------------------------------

PLCSTParser::Access_NameContext::Access_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Access_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Access_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleAccess_Name;
}

void PLCSTParser::Access_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterAccess_Name(this);
}

void PLCSTParser::Access_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitAccess_Name(this);
}


std::any PLCSTParser::Access_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitAccess_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Access_NameContext* PLCSTParser::access_Name() {
  Access_NameContext *_localctx = _tracker.createInstance<Access_NameContext>(_ctx, getState());
  enterRule(_localctx, 478, PLCSTParser::RuleAccess_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2379);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Prog_NameContext ------------------------------------------------------------------

PLCSTParser::Prog_NameContext::Prog_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Prog_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Prog_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleProg_Name;
}

void PLCSTParser::Prog_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterProg_Name(this);
}

void PLCSTParser::Prog_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitProg_Name(this);
}


std::any PLCSTParser::Prog_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitProg_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Prog_NameContext* PLCSTParser::prog_Name() {
  Prog_NameContext *_localctx = _tracker.createInstance<Prog_NameContext>(_ctx, getState());
  enterRule(_localctx, 480, PLCSTParser::RuleProg_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2381);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Task_NameContext ------------------------------------------------------------------

PLCSTParser::Task_NameContext::Task_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Task_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Task_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleTask_Name;
}

void PLCSTParser::Task_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterTask_Name(this);
}

void PLCSTParser::Task_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitTask_Name(this);
}


std::any PLCSTParser::Task_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitTask_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Task_NameContext* PLCSTParser::task_Name() {
  Task_NameContext *_localctx = _tracker.createInstance<Task_NameContext>(_ctx, getState());
  enterRule(_localctx, 482, PLCSTParser::RuleTask_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2383);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Namespace_NameContext ------------------------------------------------------------------

PLCSTParser::Namespace_NameContext::Namespace_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Namespace_NameContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Namespace_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleNamespace_Name;
}

void PLCSTParser::Namespace_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterNamespace_Name(this);
}

void PLCSTParser::Namespace_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitNamespace_Name(this);
}


std::any PLCSTParser::Namespace_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitNamespace_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Namespace_NameContext* PLCSTParser::namespace_Name() {
  Namespace_NameContext *_localctx = _tracker.createInstance<Namespace_NameContext>(_ctx, getState());
  enterRule(_localctx, 484, PLCSTParser::RuleNamespace_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2385);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Control_VariableContext ------------------------------------------------------------------

PLCSTParser::Control_VariableContext::Control_VariableContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::IdentifierContext* PLCSTParser::Control_VariableContext::identifier() {
  return getRuleContext<PLCSTParser::IdentifierContext>(0);
}


size_t PLCSTParser::Control_VariableContext::getRuleIndex() const {
  return PLCSTParser::RuleControl_Variable;
}

void PLCSTParser::Control_VariableContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterControl_Variable(this);
}

void PLCSTParser::Control_VariableContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitControl_Variable(this);
}


std::any PLCSTParser::Control_VariableContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitControl_Variable(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Control_VariableContext* PLCSTParser::control_Variable() {
  Control_VariableContext *_localctx = _tracker.createInstance<Control_VariableContext>(_ctx, getState());
  enterRule(_localctx, 486, PLCSTParser::RuleControl_Variable);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2387);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- Indicator_NameContext ------------------------------------------------------------------

PLCSTParser::Indicator_NameContext::Indicator_NameContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

PLCSTParser::Variable_NameContext* PLCSTParser::Indicator_NameContext::variable_Name() {
  return getRuleContext<PLCSTParser::Variable_NameContext>(0);
}


size_t PLCSTParser::Indicator_NameContext::getRuleIndex() const {
  return PLCSTParser::RuleIndicator_Name;
}

void PLCSTParser::Indicator_NameContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIndicator_Name(this);
}

void PLCSTParser::Indicator_NameContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIndicator_Name(this);
}


std::any PLCSTParser::Indicator_NameContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitIndicator_Name(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::Indicator_NameContext* PLCSTParser::indicator_Name() {
  Indicator_NameContext *_localctx = _tracker.createInstance<Indicator_NameContext>(_ctx, getState());
  enterRule(_localctx, 488, PLCSTParser::RuleIndicator_Name);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2389);
    variable_Name();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IdentifierContext ------------------------------------------------------------------

PLCSTParser::IdentifierContext::IdentifierContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* PLCSTParser::IdentifierContext::Identifier() {
  return getToken(PLCSTParser::Identifier, 0);
}

tree::TerminalNode* PLCSTParser::IdentifierContext::ACTION_QUALIFIER() {
  return getToken(PLCSTParser::ACTION_QUALIFIER, 0);
}

tree::TerminalNode* PLCSTParser::IdentifierContext::ACTION_TIME_QUALIFIER() {
  return getToken(PLCSTParser::ACTION_TIME_QUALIFIER, 0);
}


size_t PLCSTParser::IdentifierContext::getRuleIndex() const {
  return PLCSTParser::RuleIdentifier;
}

void PLCSTParser::IdentifierContext::enterRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->enterIdentifier(this);
}

void PLCSTParser::IdentifierContext::exitRule(tree::ParseTreeListener *listener) {
  auto parserListener = dynamic_cast<PLCSTParserListener *>(listener);
  if (parserListener != nullptr)
    parserListener->exitIdentifier(this);
}


std::any PLCSTParser::IdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<PLCSTParserVisitor*>(visitor))
    return parserVisitor->visitIdentifier(this);
  else
    return visitor->visitChildren(this);
}

PLCSTParser::IdentifierContext* PLCSTParser::identifier() {
  IdentifierContext *_localctx = _tracker.createInstance<IdentifierContext>(_ctx, getState());
  enterRule(_localctx, 490, PLCSTParser::RuleIdentifier);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(2391);
    _la = _input->LA(1);
    if (!((((_la - 95) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 95)) & 1125899906842627) != 0)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

void PLCSTParser::initialize() {
  ::antlr4::internal::call_once(plcstparserParserOnceFlag, plcstparserParserInitialize);
}
